CN115934522A - Interface model generation method and device for MIL simulation test and storage medium - Google Patents

Interface model generation method and device for MIL simulation test and storage medium Download PDF

Info

Publication number
CN115934522A
CN115934522A CN202211510012.XA CN202211510012A CN115934522A CN 115934522 A CN115934522 A CN 115934522A CN 202211510012 A CN202211510012 A CN 202211510012A CN 115934522 A CN115934522 A CN 115934522A
Authority
CN
China
Prior art keywords
interface
signal
module
interface table
data
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.)
Pending
Application number
CN202211510012.XA
Other languages
Chinese (zh)
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.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile 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 Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211510012.XA priority Critical patent/CN115934522A/en
Publication of CN115934522A publication Critical patent/CN115934522A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention belongs to the technical field of advanced driver assistance system simulation tests, and particularly relates to an interface model generation method, an interface model generation device and a storage medium for MIL simulation tests, wherein the method comprises the following steps: s1, establishing an interface table, defining data in the interface table, configuring the interface table and a matlab workspace, and enabling the matlab workspace to acquire the interface table data and respectively store and name the interface table data; s2, establishing a blank model, and adding a signal module in the blank model; and S3, connecting the model added with the signal module with a matlab working space, configuring the data of the signal module and the interface table, and automatically generating an interface model. The purpose is as follows: the method is used for solving the problems that the efficiency is low and errors are easily introduced by adopting manual interface model construction pointed out in the background technology.

Description

Interface model generation method and device for MIL simulation test and storage medium
Technical Field
The invention belongs to the technical field of advanced driver assistance system simulation tests, and particularly relates to an interface model generation method and device for MIL simulation tests and a storage medium.
Background
With the development of the intelligent internet automobile industry, an Advanced Driving Assistance System (ADAS) gradually becomes a standard configuration of an automobile driving system, and is a hot spot for automobile industry research in recent years. Aiming at the functions of an auxiliary driving system, such as AEB (automatic emergency braking), LDW (lane departure warning), LKA (lane keeping assist), etc., most of the current domestic host plants or suppliers still adopt a model-based development mode, i.e., MBD (model based design) development process, to develop an algorithm model in the matlab/simulink environment, and based on the development mode, the MIL (model loop) test becomes a test verification means which is best in line with the test requirements. The idea of MIL test is to use mainstream scene software such as Prescan, VTD and the like on the market to build a virtual simulation test environment, output information such as an environment target, a lane and the like and motion attitude information of a vehicle through a sensor model and a dynamic model of the software, input the information into a tested algorithm, namely AEB or LKA and the like, for testing the response of the algorithm to the surrounding environment, and simultaneously, the algorithm feeds a control instruction obtained by calculation back to the vehicle dynamics of the scene software to influence the motion attitude of the vehicle, thereby achieving a closed-loop test effect.
The most important step in the preparation of the MIL test environment is the establishment of an interface model, which signals are respectively contained in the input and output of the tested algorithm, and what the names and meanings of the signals are firstly required to be clear. Taking the AEB algorithm as an example, the output of the algorithm generally includes two types, one type is a target signal, the other type is a vehicle information signal, wherein the target signal generally has 32 targets, each target has dozens of target familiarity, such as target type, target speed, target acceleration, relative vehicle distance, reliability and the like, the vehicle information signal generally has dozens to hundreds of differences, and the vehicle information signal includes the speed, wheel speed, acceleration, course angle, EPS state, ESC state, various state alarm information and the like of the vehicle. These signals are generally created in simulink in the type of Bus, which means that when configuring the interface model, it is necessary to ensure not only the number of these signals to be correct, but also the naming of the signals to be completely correct, otherwise, the simulation operation will report an error, and at the same time, for the convenience of subsequent work, the interface model must be neat, beautiful and easy to read. The above requirements pose a great challenge to modelers, and manual modeling is particularly easy to introduce errors, which reduces development efficiency.
At present, most of research based on MIL test focuses on scene building, test case generation and test methods and the like, but few research focuses on how to generate an interface model more simply and quickly. In the MIL simulation test process, due to the difference of the tested algorithms, the interfaces between the simulation environment and the tested algorithms are often required to be adapted again, and the input signals of the ADAS algorithm are very many because the current ADAS algorithm needs to sense the surrounding environment, so that great workload is brought to the interface adaptation work, and modeling personnel generally adopt a mode of manually constructing an interface model, but the mode has low efficiency and is easy to introduce errors.
Disclosure of Invention
The purpose of the invention is: the method, the device and the storage medium for generating the interface model for the MIL simulation test are used for solving the problems that the efficiency is low and errors are easy to introduce due to the fact that the interface model is manually built in the background technology.
In order to achieve the technical purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present application provides an interface model generation method for MIL simulation testing, including the following steps:
s1, establishing an interface table, defining data in the interface table, configuring the interface table and a matlab working space, and enabling the matlab working space to acquire the interface table data and respectively store and name the interface table data;
s2, establishing a blank model, and adding a signal module in the blank model;
and S3, connecting the model added with the signal module with a matlab working space, configuring the data of the signal module and the interface table, and automatically generating an interface model.
By compiling the matlab m language script, automatically importing the interface table provided by the algorithm personnel, automatically extracting variables, names and data types in the table, and then automatically generating the corresponding interface model through the m script command, a great deal of effort of modeling simulation personnel can be saved through the method, errors and the like caused by the fact that the modeling personnel careless attention is avoided, and the MIL building test efficiency is greatly improved.
With reference to the first aspect, preferably, in the step S1, the interface table data includes, but is not limited to, a signal name, a signal type, and a signal definition.
By classifying the information in the interface table, the information loading of the matlab working space is facilitated.
In connection with the first aspect, preferably, the interface table includes, but is not limited to, excel.
With reference to the first aspect, preferably, in the S1 step, when the matlab workspace acquires the interface table data, and stores and names the interface table data respectively, the interface table data is stored in the matlab workspace in a matrix form and is named Signal _ list and datatype _ list respectively.
With reference to the first aspect, preferably, in the step S2, in the Signal module adding process, the dimension of Signal _ list is calculated through an m-script command, and then a Constant module, a Data type conversion module, and a BusCreator module corresponding to the number of signals are added, where the number of inputs of the BusCreator module is equal to the number of signals.
With reference to the first aspect, preferably, in the step S3, when the signal module and the interface table are configured in data, traversing each value in the DataType _ list by using a for loop, and setting each generated DataType Conversion module to a corresponding signal type;
and traversing the Signal names in the Signal _ list by adopting a for loop, and automatically attaching corresponding names to each Signal line of the BusCreator module.
With reference to the first aspect, preferably, when the BusCreator module is input, an m-language command is used to automatically connect the output of the Constant module to the input of the corresponding DataType Conversion module, and the output of the DataType Conversion module is connected to the input of the BusCreator module.
In a second aspect, the present application further provides an interface model generating apparatus for MIL simulation testing, which is applied to the method described above, and the apparatus includes:
the interface table data acquisition unit is used for acquiring interface table data from the matlab working space when the interface table and the matlab working space are configured, and respectively storing and naming the interface table data;
and the processing unit is used for automatically generating the interface model in the matlab working space through data configuration of the signal module and the interface table when the blank model added with the signal module is connected with the matlab working space.
When the prepared interface table and the matlab working space are configured, the acquisition unit can acquire data in the interface table, the data in the interface table are named and stored respectively, the stored data are processed by the signal module in the processing unit, an interface model can be automatically generated in the matlab working space, convenience and rapidness are achieved, and the modeling efficiency and quality are improved.
In a third aspect, the present application also provides a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the above-mentioned method.
The invention adopting the technical scheme has the advantages that:
the method comprises the steps of defining input signals and output signals in an interface table, automatically loading the signal interface table in a matlab by writing an m script, automatically extracting information such as signal names and signal types in the table, automatically modeling based on the extracted information, automatically creating a data type conversion module, a bus module and an initial value module, respectively defining the signal type and the signal line name of each data conversion module according to the extracted data types and signal names, finally generating a neat and attractive interface model by defining the position of each module in the script in a one-key mode, and only manually replacing useful signals needing to actually participate in simulation closed loop by a modeling worker in subsequent work, so that the early-stage preparation work of the modeling worker is greatly reduced, and the modeling efficiency and quality are improved.
Drawings
The present application can be further illustrated by the non-limiting examples given in the figures. It is to be understood that the following drawings illustrate only certain embodiments of this application and are therefore not to be considered limiting of scope, for those skilled in the art will appreciate that other related drawings may be made in accordance therewith without the exercise of inventive faculty;
fig. 1 is a first block diagram of an interface model generation method provided in an embodiment of the present application;
fig. 2 is a second block diagram of an interface model generation method provided in the embodiment of the present application;
fig. 3 is a block diagram of an interface model generation apparatus according to an embodiment of the present application;
the main element symbols are as follows:
the interface model generation device 200, the acquisition unit 210 and the processing unit 220.
Detailed Description
The present application will be described in detail with reference to the drawings and specific embodiments, and it should be noted that in the drawings or specification, similar or identical parts are denoted by the same reference numerals, and implementations not shown or described in the drawings are known to those of ordinary skill in the art. In the description of the present application, the terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, an embodiment of the present application provides an interface model generation method for MIL simulation testing, including the following steps:
step 110, establishing an interface table, defining data in the interface table, configuring the interface table and a matlab workspace, and enabling the matlab workspace to acquire the interface table data and respectively store and name the interface table data;
step 120, establishing a blank model, and adding a signal module in the blank model;
and step 130, connecting the model added with the signal module with the matlab working space, configuring the data of the signal module and the interface table, and automatically generating the interface model.
In the embodiment, the m language script of matlab is compiled, the interface table provided by algorithm personnel is automatically imported, the variables, the names and the data types in the table are automatically extracted, and then the corresponding interface model is automatically generated through an m script command.
As an optional implementation, the method may further include:
in step 110, the interface table data includes, but is not limited to, a signal name, a signal type, and a signal definition, the interface table includes, but is not limited to, an excel, the signal name, the signal type, and the signal definition are conveniently recorded through the excel table, and by classifying the signal name, the signal type, and the signal definition on the data in the interface table, an operator can quickly and accurately build an interface model through the matlab working space by only taking an interface detail table of the algorithm to be tested.
As an optional implementation, the method may further include:
in step 110, the matlab workspace acquires the interface table data, and stores and names the interface table data in the matlab workspace in a matrix form, where the interface table data are named Signal _ list and DateType _ list.
In this embodiment, by naming the Signal data in the interface table as Signal _ list and DateType _ list, the matlab workspace can be applied to all MIL test procedures of ADAS functions, such as AEB, LKA, etlda, ACC, and the like, when acquiring the Signal data, thereby improving convenience of use.
As an optional implementation, the method may further include:
in step 120, in the Signal module adding process, the dimension of Signal _ list is calculated through the m-script command, and then a Constant module, a DataTypeConversion module and a BusCreator module corresponding to the number of signals are added, wherein the input number of the BusCreator module is equal to the number of the signals.
When the BusCreator module is input, an m-language command is adopted for automatic connection, the output of the Constant module is connected to the input of the corresponding DataTypeConversion module, and the output of the DataTypeConversion module is connected to the input of the BusCreator module.
In this embodiment, by adding the Constant module, the DataTypeConversion module, and the BusCreator module to the blank model, the number of signals in the interface table can be quickly output to the matlab workspace.
As an optional implementation, the method may further include:
in step 130, during data configuration of the signal module and the interface table, a for loop is adopted to traverse each value in the datatype _ list, and each generated DataTypeConversion module is set to a corresponding signal type;
and traversing the Signal names in the Signal _ list by adopting a for loop, and automatically attaching corresponding names to each Signal line of the BusCreator module.
In the embodiment, variables, names and data types in the table are extracted by traversing each Signal type in the DateType _ list and the Signal name in the Signal _ list, a corresponding interface model is automatically generated through an m script command, and a great deal of effort of modeling simulation personnel can be saved through the method.
Referring to fig. 2, the steps of the interface model generation method for MIL simulation test will be described in detail as follows:
loading an excel interface table, and extracting data in the interface table to a matlab working space;
step two, data processing is carried out on excel data stored in the working space, signal names and data types in the excel data are respectively extracted and stored in a matlab working space in a matrix form, and the excel data can be respectively named as Signal _ list and Date Type _ list for later use;
step three, establishing a new blank model through an m language command;
adding a module in the opened blank model, calculating the dimensionality of Signal _ list through an m script command, and then automatically adding a Constant module, a DataTypeConversion module and a BusCreator module which correspond to the number of signals from a simullinklibrary library, wherein the input number of the BusCreator module is equal to the number of the signals;
step five, traversing each value in the DateType _ list by using a for cycle, and setting each dData TypeConversion module generated in the previous step to be a corresponding signal type;
step six, automatically connecting the line by using an m language command, connecting the output of the Constant module to the input of a corresponding DataType Conversion module, and connecting the output of the DataTypeconversion module to the input of the BusCreater module;
step seven, traversing the Signal name in the Signal _ list by using a for loop, and automatically attaching a corresponding name to each Signal line of the BusCreator module;
and step eight, automatically storing the interface model for the MIL simulation test.
Based on the design, the input signal and the output signal in the interface table are defined, the signal interface table is automatically loaded in the matlab through a mode of writing an m script, then information such as a signal name, a signal type and the like in the table is automatically extracted, automatic modeling is carried out based on the extracted information, a data type conversion module, a bus module and an initial value module are automatically created, the signal type and the signal line name of each data conversion module are respectively defined according to the extracted data type and the extracted signal name, a neat and attractive interface model is finally generated through defining the position of each module in the script in a one-key mode, and the follow-up work only needs a modeling worker to manually replace a useful signal which needs to actually participate in a simulation closed loop, so that the early preparation work of the modeling worker is greatly reduced, and the modeling efficiency and quality are improved.
Referring to fig. 3, an embodiment of the present application further provides an interface model generation apparatus for MIL simulation testing, where the interface model generation apparatus 200 includes at least one software functional module that may be stored in a storage module in the form of software or Firmware (Firmware) or solidified in an Operating System (OS). For example, a software functional module and a computer program included in the model generation apparatus 200.
The interface model generation apparatus 200 includes an acquisition unit 210 and a processing unit 220, and functions of the units may be as follows:
the obtaining unit 210 is configured to obtain interface table data from a matlab workspace when the interface table and the matlab workspace are configured, and store and name the interface table data respectively;
and the processing unit 220 is used for automatically generating an interface model in the matlab working space through data configuration of the signal module and the interface table when the blank model added with the signal module is connected with the matlab working space.
In this embodiment, the storage module may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module may be used to store the operating states of the obtaining unit 210 and the processing unit 220, and the like. Of course, the storage module may also be used to store a program, and the processing module executes the program after receiving the execution instruction.
When the prepared interface table and the matlab workspace are configured, the obtaining unit 210 can obtain the data in the interface table, name and store the data in the interface table respectively, and the stored data is processed by the signal module in the processing unit 220, so that an interface model can be automatically generated in the matlab workspace, convenience and rapidness are achieved, and the modeling efficiency and quality are improved.
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium has stored therein a computer program that, when run on a computer, causes the computer to execute the brake control method as described in the above-described embodiments.
From the above description of the embodiments, it is obvious to those skilled in the art that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, or the like), and includes several instructions to enable a computer device (which may be a personal computer, a braking device, or a network device, or the like) to execute the method described in each implementation scenario of the present invention.
In summary, the embodiments of the present application provide an interface model generation method, an interface model generation device, and a storage medium for MIL simulation testing. In the scheme, the method for automatically generating the interface model adaptive to the tested algorithm by writing the m scripts is suitable for the MIL test process of all ADAS functions, such as AEB, LKA, eLKA, ACC and the like, and only the interface list of the tested algorithm needs to be taken. By the method, a great deal of energy of modeling simulation personnel can be saved, errors and the like caused by inattention of the modeling personnel are avoided, and the MIL building test efficiency is greatly improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. The interface model generation method for MIL simulation test is characterized by comprising the following steps: the method comprises the following steps:
s1, establishing an interface table, defining data in the interface table, configuring the interface table and a matlab working space, and enabling the matlab working space to acquire the interface table data and respectively store and name the interface table data;
s2, establishing a blank model, and adding a signal module in the blank model;
and S3, connecting the model added with the signal module with a matlab working space, configuring the data of the signal module and the interface table, and automatically generating an interface model.
2. The interface model generation method for MIL simulation testing of claim 1, wherein: in step S1, the interface table data includes, but is not limited to, signal name, signal type, and signal definition.
3. The interface model generation method for MIL simulation testing of claim 2, wherein: the interface table includes, but is not limited to, excel.
4. The interface model generation method for MIL simulation testing of claim 1, wherein: the method further comprises the step of in the S1, when the matlab workspace acquires the interface table data and respectively stores and names the interface table data, the interface table data are stored in the matlab workspace in a matrix form and are respectively named as Signal _ list and Date Type _ list.
5. The interface model generation method for MIL simulation testing of claim 4, wherein: in the step S2, in the Signal module adding process, the dimension of Signal _ list is calculated through an m-script command, and then a Constant module, a Data Type Conversion module, and a Bus Creator module corresponding to the number of signals are added, where the number of inputs of the Bus Creator module is equal to the number of signals.
6. The interface model generation method for MIL simulation testing of claim 5, wherein: in the step S3, when the signal module and the interface table are configured, a for loop is adopted to traverse each value in the Date Type _ list, and each generated Data Type Conversion module is set to a corresponding signal Type;
and traversing the Signal names in the Signal _ list by adopting a for loop, and automatically attaching corresponding names to each Signal line of the Bus Creator module.
7. The interface model generation method for MIL simulation testing of claim 5, wherein: the method also comprises the step of adopting an m language command to automatically connect when the Bus Creator module inputs, connecting the output of the Constant module to the input of the corresponding DataType Conversion module, and connecting the output of the DataType Conversion module to the input of the Bus Creator module.
8. An interface model generation device for MIL simulation test is characterized in that: the method as applied to any one of claims 1-7, the apparatus comprising:
the interface table data acquisition unit is used for acquiring interface table data from the matlab working space when the interface table and the matlab working space are configured, and respectively storing and naming the interface table data;
and the processing unit is used for automatically generating the interface model in the matlab working space through data configuration of the signal module and the interface table when the blank model added with the signal module is connected with the matlab working space.
9. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1 to 7.
CN202211510012.XA 2022-11-29 2022-11-29 Interface model generation method and device for MIL simulation test and storage medium Pending CN115934522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211510012.XA CN115934522A (en) 2022-11-29 2022-11-29 Interface model generation method and device for MIL simulation test and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211510012.XA CN115934522A (en) 2022-11-29 2022-11-29 Interface model generation method and device for MIL simulation test and storage medium

Publications (1)

Publication Number Publication Date
CN115934522A true CN115934522A (en) 2023-04-07

Family

ID=86650026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211510012.XA Pending CN115934522A (en) 2022-11-29 2022-11-29 Interface model generation method and device for MIL simulation test and storage medium

Country Status (1)

Country Link
CN (1) CN115934522A (en)

Similar Documents

Publication Publication Date Title
CN102650966B (en) A kind of embedded software test method of Reuse-Oriented and test macro thereof
EP3287901A1 (en) Simulation including multiple simulators
EP3605248A1 (en) Information processing device, information processing method, computer program, and program manufacturing method
US10108763B2 (en) Method and simulation arrangement for simulating an automated industrial plant
JP2014203314A (en) ECU simulation device
CN108802511B (en) Method and system for testing battery management unit
CN103150188B (en) The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
CN112506759A (en) Automatic testing method and device for servo system control software and storage medium
US20190147131A1 (en) Ecu simulation device
CA2984166A1 (en) Method for computer-supported development of an overall system consisting of subsystems
CN105630661A (en) Automatic cross-system program debugging method and device
CN113868174B (en) Verification platform building method and device and storage medium
CN115934522A (en) Interface model generation method and device for MIL simulation test and storage medium
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
Schneider et al. Significant reduction of validation efforts for dynamic light functions with FMI for multi-domain integration and test platforms
Muli et al. Virtual validation-a new paradigm in controls engineering
CN114894505A (en) Electric power steering system model and automatic test system and method thereof
CN115348200A (en) CAN communication function test method and test system
US20170220712A1 (en) Computer-implemented method for simulating a restbus control unit network
US20210141710A1 (en) Development support device
CN110737211A (en) guided weapon multifunctional semi-physical simulation test control system and method
Koch et al. Simulation-based verification for parallelization of model-based applications
US10488835B2 (en) Method for configuring a tester equipped for testing an electronic control unit
CN113643128B (en) Automatic testing method and device for bank products
EP3301582A1 (en) Information processing apparatus, information processing method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination