CN109426237B - Hardware-in-loop test method and device for Electronic Control Unit (ECU) - Google Patents

Hardware-in-loop test method and device for Electronic Control Unit (ECU) Download PDF

Info

Publication number
CN109426237B
CN109426237B CN201710758300.XA CN201710758300A CN109426237B CN 109426237 B CN109426237 B CN 109426237B CN 201710758300 A CN201710758300 A CN 201710758300A CN 109426237 B CN109426237 B CN 109426237B
Authority
CN
China
Prior art keywords
function
calibration
ecu
measurement calibration
calibration system
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
CN201710758300.XA
Other languages
Chinese (zh)
Other versions
CN109426237A (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.)
Great Wall Motor Co Ltd
Original Assignee
Great Wall Motor 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 Great Wall Motor Co Ltd filed Critical Great Wall Motor Co Ltd
Priority to CN201710758300.XA priority Critical patent/CN109426237B/en
Publication of CN109426237A publication Critical patent/CN109426237A/en
Application granted granted Critical
Publication of CN109426237B publication Critical patent/CN109426237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Abstract

The embodiment of the invention provides a hardware-in-loop test method and a hardware-in-loop test device for an Electronic Control Unit (ECU), wherein the ECU is communicated with a hardware-in-loop (HIL) simulator, the HIL simulator is communicated with an automatic test system, the ECU is communicated with a measurement calibration system through a control unit local area network (CAN) transceiver, and the automatic test system is communicated with the measurement calibration system, and the method comprises the following steps: the automatic test system generates a test sequence to carry out hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function; when the automatic test system runs the test sequence, the automatic test system executes the preset interface function, calls the measurement calibration system, and collects and/or calibrates the internal variables of the ECU through the measurement calibration system. The method of the embodiment of the invention greatly improves the automation degree and efficiency, is not limited to a specific product of a certain company, has strong universality and is easy to expand.

Description

Hardware-in-loop test method and device for Electronic Control Unit (ECU)
Technical Field
The invention relates to the technical field of automobiles, in particular to a hardware-in-loop test method and a hardware-in-loop test device for an Electronic Control Unit (ECU).
Background
At present, the number of integrated controllers in an automobile is more and more, and the functions are more and more complex. The importance of controller testing and calibration is also becoming increasingly important. In the testing process, in order to save manpower, time or hardware resources, the testing efficiency is improved, and the realization of automatic testing is very necessary.
Most of the existing automatic tests are based on hardware-in-loop (HiL) (hard Ware in Loop) tests, and common test software comprises Automationdesk of dSPACE company, INTES of Hengrun company and other business software.
At present, most of the test software is the same as or different from each other, the HiL upper computer software is controlled through a test sequence to perform operations such as gear shifting, acceleration and deceleration, and the like, so that the working condition of the required test is realized. But the defects are that the relevant variable data of the tested object can be collected and calibrated only through the specific equipment of the company, the method is not suitable for products of other companies, the universality is not strong, and the method is not beneficial to realizing the platform expansion.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a hardware-in-loop test method of an electronic control unit ECU and a corresponding hardware-in-loop test apparatus of an electronic control unit ECU that overcome or at least partially solve the above problems.
In order to solve the above problems, an embodiment of the present invention discloses a hardware-in-loop testing method for an electronic control unit ECU, wherein the ECU communicates with a hardware-in-loop HIL simulator, the HIL simulator communicates with an automatic testing system, the ECU communicates with a measurement calibration system through a control unit local area network CAN transceiver, the automatic testing system communicates with the measurement calibration system, and the method includes:
the automatic test system generates a test sequence to carry out hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function;
when the automatic test system runs the test sequence, the automatic test system executes the preset interface function, calls the measurement calibration system, and collects and/or calibrates the internal variables of the ECU through the measurement calibration system.
Preferably, the preset interface function includes: initializing a function, a variable setting function and a variable value obtaining function; the automatic test system executes the preset interface function, calls the measurement calibration system, collects the signals through the measurement calibration system, and/or calibrates the internal variables of the ECU, and the steps comprise:
the automatic test system runs the initialization function and establishes connection with the measurement calibration system;
the automatic test system runs the variable setting function, sets internal variables of the ECU to be acquired and recorded through the measurement calibration system, and sets acquisition frequency;
the automatic test system judges whether calibration is needed or not;
and if the calibration is not needed, the automatic test system runs the variable value acquisition function, and the value of the preset variable is acquired in real time through the measurement calibration system.
Preferably, the preset interface function further includes: calibrating a function; the steps of the automatic test system executing the preset interface function, calling the measurement calibration system, collecting through the measurement calibration system, and/or calibrating the internal variables of the ECU further comprise:
if the calibration is needed, the automatic test system operates the calibration function, and the preset calibration quantity and the preset calibration table are modified through the measurement calibration system;
after the modification is finished, the automatic test system runs the variable value acquisition function, and the value of the set variable is acquired in real time through the measurement calibration system;
the automatic test system judges whether the modification of the standard quantity is appropriate;
and if the calibration quantity is not properly modified, returning to the automatic test system to operate the calibration function, and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
Preferably, the preset interface function further includes: recording a function and a data storage function; the steps of the automatic test system executing the preset interface function, calling the measurement calibration system, collecting through the measurement calibration system, and/or calibrating the internal variables of the ECU further comprise:
the automatic test system runs the recording function, and records the obtained variable value through the measurement calibration system;
and the automatic test system runs the data storage function, and sets the name of the data to be stored through the measurement calibration system.
Preferably, the preset interface function is a function written according to the ASAP3 protocol.
The embodiment of the invention also discloses a hardware-in-loop testing device of the electronic control unit ECU, wherein the ECU is communicated with the hardware-in-loop HIL simulator, the HIL simulator is communicated with an automatic testing system, the ECU is communicated with a measurement calibration system through a control unit local area network CAN transceiver, the automatic testing system is communicated with the measurement calibration system, and the device comprises:
the test sequence generation module is positioned in the automatic test system and used for generating a test sequence to carry out hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function;
and the calling module is positioned in the automatic test system and used for executing the preset interface function to call the measurement calibration system when the test sequence is operated, and acquiring and/or calibrating the internal variables of the ECU through the measurement calibration system.
Preferably, the preset interface function includes: initializing a function, a variable setting function and a variable value obtaining function; the calling module comprises:
the initialization submodule is used for operating the initialization function and establishing connection with the measurement calibration system;
the variable setting submodule is used for operating the variable setting function, setting internal variables of the ECU to be acquired and recorded through the measurement calibration system, and setting acquisition frequency;
the calibration judgment submodule is used for judging whether calibration is needed or not;
and the first variable value acquisition submodule runs the variable value acquisition function if the calibration is not needed, and acquires the value of the preset variable in real time through the measurement calibration system.
Preferably, the preset interface function further includes: calibrating a function; the calling module further comprises:
the calibration submodule is used for operating the calibration function if calibration is needed, and modifying a preset calibration quantity and a preset calibration table through the measurement calibration system;
the second variable value acquisition submodule is used for operating the variable value acquisition function after the modification is finished, and acquiring the value of the set variable in real time through the measurement calibration system;
a standard quantity modification judgment submodule for judging whether the modification of the standard quantity is appropriate;
and the return submodule is used for returning to the calibration submodule if the calibration quantity is not properly modified, operating the calibration function and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
Preferably, the preset interface function further includes: recording a function and a data storage function;
the calling module further comprises:
the recording submodule is used for operating the recording function and recording the obtained variable value through the measurement calibration system;
and the data storage submodule is used for operating the data storage function and setting the name of the data to be stored through the measurement calibration system.
Preferably, the preset interface function is a function written according to the ASAP3 protocol.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the automatic test system runs the test sequence to perform automatic hardware-in-loop simulation test on the ECU, and the measurement calibration system is called to collect and automatically calibrate the internal variables of the ECU by running the preset interface function in the automatic process, so that the automation degree and efficiency are greatly improved. The method of the embodiment of the invention can also add a function for testing various working conditions of the automobile based on the hardware-in-loop simulator in the test sequence, thereby completing a large amount of gray box tests, increasing the coverage of automatic tests and further improving the test efficiency. Especially for tests requiring repeated operation for many times, such as reliability, the test efficiency can be greatly improved.
Drawings
FIG. 1 is a flowchart of the steps of an embodiment 1 of a hardware-in-the-loop testing method of an electronic control unit ECU according to the present invention;
FIG. 2 is a block diagram of a hardware-in-loop test method of an electronic control unit ECU in an embodiment of the present invention;
FIG. 3 is a flowchart of the steps of an embodiment 2 of a hardware-in-the-loop testing method of an electronic control unit ECU according to the present invention;
fig. 4 is a block diagram of an embodiment of a hardware-in-loop testing apparatus for an ECU according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of embodiment 1 of a hardware-in-loop testing method for an electronic control unit ECU according to the present invention is shown, wherein the ECU communicates with a hardware-in-loop HIL simulator, the HIL simulator communicates with an automated testing system, the ECU communicates with a measurement calibration system through a control unit local area network CAN transceiver, and the automated testing system communicates with the measurement calibration system, and the method specifically includes the following steps:
101, generating a test sequence by the automatic test system to perform hardware-in-loop simulation test on an ECU; the test sequence comprises a preset interface function;
in the embodiment of the present invention, a communication protocol between the automated testing system ausy (automation system) and the measurement calibration system MC (measurement calibration) is an ASAP3(ASAM-MCD-3MC) protocol. The automated testing system can adopt dSPACE automated testing software Automationdesk to build a testing sequence. The preset interface function can be written by adopting Python language according to an ASAP3 protocol, and comprises a function for calling a measurement calibration system and acquiring and calibrating internal variables of the ECU, so that the automatic test system can operate the preset interface function to call the measurement calibration system and acquire and calibrate the internal variables of the ECU.
Besides the preset interface function, the test sequence can also comprise a function for testing various working conditions of the automobile based on a hardware-in-loop simulator, so that a large number of gray box test behaviors can be automatically realized.
The gray box test combines the test elements of the black box and the white box, and simultaneously pays attention to the internal realization of a software system and the external characteristics of the system, thereby not only considering the client function, the framework and the environment of the system, but also making up for the limitation of the pure black box test and the pure white box test.
In the embodiment of the invention, the HIL simulator is communicated with the automatic test system through the upper computer control software.
Fig. 2 is a block diagram of a hardware-in-loop test method of an ECU according to an embodiment of the present invention. In the embodiment of the invention, a tested ECU is communicated with a hardware-in-loop HIL simulator and a Controller Area Network (CAN) transceiver; the hardware-in-loop simulator is controlled by upper computer control software, and the hardware-in-loop HIL simulator is communicated with the automatic test system through the upper computer control software; the control unit local area network transceiver is communicated with the measurement calibration system; the measurement calibration system is in communication with the automated testing system.
The upper computer control software of the hardware-in-loop simulator can be control software ControlDesk, the automatic test system can be automatic test platform AutomationDesk of dSPACE company, and the measurement calibration system can be measurement calibration software INCA.
And 102, when the automatic test system runs the test sequence, the automatic test system executes the preset interface function, calls the measurement calibration system, and collects and/or calibrates the internal variables of the ECU through the measurement calibration system.
In the embodiment of the invention, the automatic test system runs the test sequence to perform automatic hardware-in-loop simulation test on the ECU, and calls the measurement calibration system to collect and automatically calibrate the internal variables of the ECU by running the preset interface function in the automatic process, thereby greatly improving the automation degree and efficiency. The method of the embodiment of the invention is not limited to a specific product of a certain company, and for automatic test systems of different companies, measurement calibration systems of other companies can be called by adding the preset interface function in the test sequence through the method of the embodiment of the invention. The invention has strong universality and easy expansion. The method of the embodiment of the invention can also add a function for testing various working conditions of the automobile based on the hardware-in-loop simulator in the test sequence, thereby completing a large amount of gray box tests, increasing the coverage of automatic tests and further improving the test efficiency. Especially for tests requiring repeated operation for many times, such as reliability, the test efficiency can be greatly improved.
Referring to fig. 3, a flowchart illustrating steps of embodiment 2 of a hardware-in-loop testing method for an electronic control unit ECU according to the present invention is shown, wherein the ECU communicates with a hardware-in-loop HIL simulator, the HIL simulator communicates with an automated testing system, the ECU communicates with a measurement calibration system through a control unit local area network CAN transceiver, and the automated testing system communicates with the measurement calibration system, and the method specifically includes the following steps:
step 201, the automatic test system generates a test sequence to perform hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function; wherein, the preset interface function comprises: initializing a function, a variable setting function and a variable value obtaining function;
in the embodiment of the invention, the HIL simulator is communicated with the automatic test system through the upper computer control software.
In the embodiment of the present invention, the preset interface function may be written in Python language according to the ASAP3 protocol, and a plurality of functions may be encapsulated in the preset interface function, and each function calls a different function of the measurement calibration system.
Step 202, when the automatic test system runs the test sequence, the automatic test system runs the initialization function and establishes connection with the measurement calibration system;
the initialization function can connect the automatic test system with the measurement calibration system according to the IP address and the port number of the computer to which the called measurement calibration system belongs.
Step 203, the automatic test system runs the variable setting function, sets internal variables of the ECU to be acquired and recorded through the measurement calibration system, and sets acquisition frequency;
the variable setting function can call the measurement calibration system to set internal variables of the ECU to be acquired and recorded, and set acquisition frequency.
After the variable setting function is operated, a user can set internal variables of the ECU to be acquired and recorded and set acquisition frequency in the automatic test system.
Step 204, the automatic test system judges whether calibration is needed;
calibration refers to a control algorithm for adjusting, optimizing and determining the operation and control parameters of the ECU according to various performance requirements (such as dynamic performance and emission performance) of the vehicle.
Whether the calibration is needed or not can be preset, and whether the calibration is needed or not can be selected by a user in an automatic test system in real time.
Step 205, if the calibration is not needed, the automatic test system runs the variable value obtaining function, and obtains the value of the preset variable in real time through the measurement calibration system.
The variable value acquisition function can call the measurement calibration system to acquire the value of the preset variable in real time.
In this embodiment of the present invention, the preset interface function may further include: calibrating a function; the method may further comprise:
step 206, if calibration is needed, the automatic test system runs the calibration function, and the preset calibration quantity and the preset calibration table are modified through the measurement calibration system;
step 207, after the modification is completed, the automatic test system runs the variable value acquisition function, and the value of the set variable is acquired in real time through the measurement calibration system;
step 208, the automatic test system judges whether the modification of the calibration quantity is appropriate;
whether the calibration quantity is properly modified can be determined by the user at the automated testing system.
And 209, if the calibration quantity is not properly modified, returning to the automatic test system to operate the calibration function, and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
And returning to the step 206 if the calibration quantity is not properly modified, wherein the automatic test system runs the calibration function, and the preset calibration quantity and the preset calibration table are modified by the measurement calibration system.
If the calibration quantity is properly modified, the subsequent steps are continued.
In this embodiment of the present invention, the preset interface function may further include: recording a function and a data storage function; the method may further comprise:
step 210, the automatic test system runs the recording function, and records the obtained variable value through the measurement calibration system;
the recording function can activate the data recording function of the measurement calibration system, so that the measurement calibration system starts to record data, and the upper limit of the recording time can be set by a user.
And step 211, the automatic test system runs the data storage function, and sets the name of the data to be stored through the measurement calibration system.
After the data saving function is run, the user can set the name of the data to be saved in the automatic test system.
In an embodiment of the present invention, the preset interface functions added to the test sequence include: the system comprises an initialization function, a variable setting function, a variable value obtaining function, a calibration function, a recording function and a data storage function.
The automatic testing system operates an initialization function, a variable setting function, a variable value obtaining function, a calibration function, a recording function and a data storage function, calls a measurement calibration system to collect and automatically calibrate internal variables of the ECU, and greatly improves the automation degree and efficiency.
The method of the embodiment of the invention can also add a function for testing various working conditions of the automobile based on the hardware-in-loop simulator in the test sequence, thereby completing a large amount of gray box tests, increasing the coverage of automatic tests and further improving the test efficiency. Especially for tests requiring repeated operation for many times, such as reliability, the test efficiency can be greatly improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of an embodiment of a hardware-in-loop testing apparatus for an electronic control unit ECU according to the present invention is shown, wherein the ECU communicates with a hardware-in-loop HIL simulator, the HIL simulator communicates with an automated testing system, the ECU communicates with a measurement calibration system through a control unit local area network CAN transceiver, the automated testing system communicates with the measurement calibration system, and the apparatus specifically includes the following modules:
a test sequence generation module 401 located in the automated test system, configured to generate a test sequence to perform hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function;
in the embodiment of the invention, the preset interface function is a function written according to the protocol of the ASAP 3. A calling module 402 located in the automated testing system, configured to execute the preset interface function to call the measurement calibration system when the testing sequence is run, and acquire and/or calibrate the internal variable of the ECU through the measurement calibration system.
In an embodiment of the present invention, the preset interface function may include: initializing a function, a variable setting function and a variable value obtaining function; the invoking module 402 may include:
the initialization submodule is used for operating the initialization function and establishing connection with the measurement calibration system;
the variable setting submodule is used for operating the variable setting function, setting internal variables of the ECU to be acquired and recorded through the measurement calibration system, and setting acquisition frequency;
the calibration judgment submodule is used for judging whether calibration is needed or not;
and the first variable value acquisition submodule runs the variable value acquisition function if the calibration is not needed, and acquires the value of the preset variable in real time through the measurement calibration system.
In this embodiment of the present invention, the preset interface function may further include: calibrating a function; the invoking module 402 may further include:
the calibration submodule is used for operating the calibration function if calibration is needed, and modifying a preset calibration quantity and a preset calibration table through the measurement calibration system;
the second variable value acquisition submodule is used for operating the variable value acquisition function after the modification is finished, and acquiring the value of the set variable in real time through the measurement calibration system;
a standard quantity modification judgment submodule for judging whether the modification of the standard quantity is appropriate;
and the return submodule is used for returning to the calibration submodule if the calibration quantity is not properly modified, operating the calibration function and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
In this embodiment of the present invention, the preset interface function may further include: recording a function and a data storage function;
the invoking module 402 may further include:
the recording submodule is used for operating the recording function and recording the obtained variable value through the measurement calibration system;
and the data storage submodule is used for operating the data storage function and setting the name of the data to be stored through the measurement calibration system.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiment of the invention also discloses an electronic device, which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and is characterized in that the processor executes the program to realize the following steps:
generating a test sequence to perform hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function;
and when the test sequence is operated, executing the preset interface function to call a measurement calibration system, and acquiring and/or calibrating internal variables of the ECU through the measurement calibration system.
Preferably, the preset interface function may include: initializing a function, a variable setting function and a variable value obtaining function; the processor, when executing the program, may further implement the steps of:
operating the initialization function and establishing connection with the measurement calibration system;
operating the variable setting function, setting internal variables of the ECU to be acquired and recorded through the measurement calibration system, and setting acquisition frequency;
judging whether calibration is needed or not;
and if the calibration is not needed, the variable value acquisition function is operated, and the value of the preset variable is acquired in real time through the measurement calibration system.
Preferably, the preset interface function may further include: calibrating a function; the processor, when executing the program, may further implement the steps of:
if the calibration is needed, the calibration function is operated, and the preset calibration quantity and the preset calibration table are modified through the measurement calibration system;
after the modification is finished, operating the variable value acquisition function, and acquiring the value of the set variable in real time through the measurement calibration system;
judging whether the modification of the calibration quantity is appropriate;
and if the calibration quantity is not properly modified, returning to the automatic test system to operate the calibration function, and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
Preferably, the preset interface function may further include: recording a function and a data storage function; the processor, when executing the program, may further implement the steps of:
running the recording function, and recording the obtained variable value through the measurement calibration system;
and operating the data storage function, and setting the name of the data to be stored through the measurement calibration system.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the program is used for realizing the method of the embodiment of the invention when being executed by a processor.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The hardware-in-loop testing method and the hardware-in-loop testing device for the electronic control unit ECU provided by the invention are described in detail, specific examples are applied in the text to explain the principle and the implementation mode of the invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A hardware-in-loop test method for an Electronic Control Unit (ECU), wherein the ECU communicates with a hardware-in-loop (HIL) emulator, the HIL emulator communicates with an automated test system, the ECU communicates with a measurement calibration system through a control unit area network (CAN) transceiver, the automated test system communicates with the measurement calibration system, the method comprising:
the automatic test system generates a test sequence to carry out hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function; the preset interface function comprises a function for calling a measurement calibration system, and acquiring and calibrating internal variables of the ECU;
when the automatic test system runs the test sequence, the automatic test system executes the preset interface function, calls the measurement calibration system, and collects and/or calibrates the internal variables of the ECU through the measurement calibration system;
the preset interface functions include: initializing a function, a variable setting function and a variable value obtaining function; the automatic test system executes the preset interface function, calls the measurement calibration system, collects the signals through the measurement calibration system, and/or calibrates the internal variables of the ECU, and the steps comprise:
the automatic test system runs the initialization function and establishes connection with the measurement calibration system;
the automatic test system runs the variable setting function, sets internal variables of the ECU to be acquired and recorded through the measurement calibration system, and sets acquisition frequency;
the automatic test system judges whether calibration is needed or not;
and if the calibration is not needed, the automatic test system runs the variable value acquisition function, and the value of the preset variable is acquired in real time through the measurement calibration system.
2. The method of claim 1, wherein the preset interface function further comprises: calibrating a function; the steps of the automatic test system executing the preset interface function, calling the measurement calibration system, collecting through the measurement calibration system, and/or calibrating the internal variables of the ECU further comprise:
if the calibration is needed, the automatic test system operates the calibration function, and the preset calibration quantity and the preset calibration table are modified through the measurement calibration system;
after the modification is finished, the automatic test system runs the variable value acquisition function, and the value of the set variable is acquired in real time through the measurement calibration system;
the automatic test system judges whether the modification of the standard quantity is appropriate;
and if the calibration quantity is not properly modified, returning to the automatic test system to operate the calibration function, and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
3. The method of claim 1 or 2, wherein the preset interface function further comprises: recording a function and a data storage function; the steps of the automatic test system executing the preset interface function, calling the measurement calibration system, collecting through the measurement calibration system, and/or calibrating the internal variables of the ECU further comprise:
the automatic test system runs the recording function, and records the obtained variable value through the measurement calibration system;
and the automatic test system runs the data storage function, and sets the name of the data to be stored through the measurement calibration system.
4. The method of claim 1, wherein the preset interface function is a function written in accordance with the ASAP3 protocol.
5. An hardware-in-loop test apparatus for an Electronic Control Unit (ECU), the ECU in communication with a hardware-in-loop (HIL) emulator, the HIL emulator in communication with an automated test system, the ECU in communication with a measurement calibration system via a control unit area network (CAN) transceiver, the automated test system in communication with the measurement calibration system, the apparatus comprising:
the test sequence generation module is positioned in the automatic test system and used for generating a test sequence to carry out hardware-in-loop simulation test on the ECU; the test sequence comprises a preset interface function; the preset interface function comprises a function for calling a measurement calibration system, and acquiring and calibrating internal variables of the ECU;
the calling module is positioned in the automatic test system and used for executing the preset interface function to call the measurement calibration system when the test sequence is operated, and acquiring and/or calibrating the internal variable of the ECU through the measurement calibration system;
the preset interface functions include: initializing a function, a variable setting function and a variable value obtaining function; the calling module comprises:
the initialization submodule is used for operating the initialization function and establishing connection with the measurement calibration system;
the variable setting submodule is used for operating the variable setting function, setting internal variables of the ECU to be acquired and recorded through the measurement calibration system, and setting acquisition frequency;
the calibration judgment submodule is used for judging whether calibration is needed or not;
and the first variable value acquisition submodule runs the variable value acquisition function if the calibration is not needed, and acquires the value of the preset variable in real time through the measurement calibration system.
6. The apparatus of claim 5, wherein the preset interface function further comprises: calibrating a function; the calling module further comprises:
the calibration submodule is used for operating the calibration function if calibration is needed, and modifying a preset calibration quantity and a preset calibration table through the measurement calibration system;
the second variable value acquisition submodule is used for operating the variable value acquisition function after the modification is finished, and acquiring the value of the set variable in real time through the measurement calibration system;
a standard quantity modification judgment submodule for judging whether the modification of the standard quantity is appropriate;
and the return submodule is used for returning to the calibration submodule if the calibration quantity is not properly modified, operating the calibration function and modifying the preset calibration quantity and the preset calibration table through the measurement calibration system.
7. The apparatus of claim 5 or 6, wherein the preset interface function further comprises: recording a function and a data storage function;
the calling module further comprises:
the recording submodule is used for operating the recording function and recording the obtained variable value through the measurement calibration system;
and the data storage submodule is used for operating the data storage function and setting the name of the data to be stored through the measurement calibration system.
8. The apparatus of claim 5, wherein the preset interface function is a function written according to the ASAP3 protocol.
CN201710758300.XA 2017-08-29 2017-08-29 Hardware-in-loop test method and device for Electronic Control Unit (ECU) Active CN109426237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710758300.XA CN109426237B (en) 2017-08-29 2017-08-29 Hardware-in-loop test method and device for Electronic Control Unit (ECU)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710758300.XA CN109426237B (en) 2017-08-29 2017-08-29 Hardware-in-loop test method and device for Electronic Control Unit (ECU)

Publications (2)

Publication Number Publication Date
CN109426237A CN109426237A (en) 2019-03-05
CN109426237B true CN109426237B (en) 2021-01-01

Family

ID=65503639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710758300.XA Active CN109426237B (en) 2017-08-29 2017-08-29 Hardware-in-loop test method and device for Electronic Control Unit (ECU)

Country Status (1)

Country Link
CN (1) CN109426237B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113495545A (en) * 2020-03-18 2021-10-12 纬湃科技投资(中国)有限公司 System and method for testing vehicle equipment controller using in-loop hardware
CN112379657B (en) * 2020-11-09 2022-04-01 中国第一汽车股份有限公司 Engine controller testing method, device, equipment and storage medium
CN112526966B (en) * 2020-11-20 2024-04-05 广西玉柴机器股份有限公司 Automatic test method and system for HIL (high-performance liquid chromatography) of controller
CN113253704B (en) * 2020-12-29 2022-08-19 际络科技(上海)有限公司 Simulation test method, device and system for vehicle ECU and electronic equipment
CN112948268A (en) * 2021-04-02 2021-06-11 广西玉柴机器股份有限公司 ECU software testing and calibration system based on INCA
CN113985839A (en) * 2021-10-18 2022-01-28 长春一汽富晟集团有限公司 XCP calibration test method based on TC397 development board

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004358988A (en) * 2003-06-02 2004-12-24 Honda Motor Co Ltd Vehicle with vehicle height adjusting function
CN103064403A (en) * 2012-12-19 2013-04-24 潍柴动力股份有限公司 Method and system of electronic control unit (ECU) hardware-in-loop simulation automated testing
CN104836713A (en) * 2014-09-02 2015-08-12 北汽福田汽车股份有限公司 Measurement and calibration method for vehicle electronic controller, device and system
CN104850112A (en) * 2014-11-04 2015-08-19 北汽福田汽车股份有限公司 Electric automobile vehicle controller test method and system
CN104865946A (en) * 2014-11-04 2015-08-26 北汽福田汽车股份有限公司 Electric vehicle hardware-in-loop testing method and system
CN105573296A (en) * 2016-01-15 2016-05-11 上海汽车变速器有限公司 Hardware-in-loop-based automation test system for automobile diagnosis, and method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4894396B2 (en) * 2006-07-28 2012-03-14 日産自動車株式会社 Inspection method and inspection device for in-vehicle electronic control device
CN101727095A (en) * 2008-10-30 2010-06-09 联创汽车电子有限公司 Method for on-line burning of flash of electric controller of automobile
CN102043717B (en) * 2010-12-28 2013-04-10 重庆恩菲斯软件有限公司 Testing system and testing method of driver module of automobile electronic calibration software
CN103162964A (en) * 2011-12-16 2013-06-19 北汽福田汽车股份有限公司 Calibration system and calibration method of hybrid electric vehicle

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004358988A (en) * 2003-06-02 2004-12-24 Honda Motor Co Ltd Vehicle with vehicle height adjusting function
CN103064403A (en) * 2012-12-19 2013-04-24 潍柴动力股份有限公司 Method and system of electronic control unit (ECU) hardware-in-loop simulation automated testing
CN104836713A (en) * 2014-09-02 2015-08-12 北汽福田汽车股份有限公司 Measurement and calibration method for vehicle electronic controller, device and system
CN104850112A (en) * 2014-11-04 2015-08-19 北汽福田汽车股份有限公司 Electric automobile vehicle controller test method and system
CN104865946A (en) * 2014-11-04 2015-08-26 北汽福田汽车股份有限公司 Electric vehicle hardware-in-loop testing method and system
CN105573296A (en) * 2016-01-15 2016-05-11 上海汽车变速器有限公司 Hardware-in-loop-based automation test system for automobile diagnosis, and method thereof

Also Published As

Publication number Publication date
CN109426237A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN109426237B (en) Hardware-in-loop test method and device for Electronic Control Unit (ECU)
US9201764B2 (en) Method and device for creating and testing a control unit program
CN109740222B (en) Testing device and system for automobile networking scene
CN106776294B (en) Automatic android mobile phone testing method and system
CN112817872A (en) Development test system and method
CN104483959A (en) Fault simulation and test system
CN107943008B (en) Automated diagnosis test method based on VT system
CN108132876B (en) Embedded software object code unit testing method based on injection mode
CN112051832B (en) Fault testing method, device and system based on simulation node and storage medium
CN112068530A (en) ECU (electronic control Unit) automatic testing method, system, storage medium and device
CN113468070A (en) Consistency test method for vehicle-mounted Ethernet
CN107797540B (en) Transmission fault testing method and device and terminal
CN104850478B (en) A kind of method and virtual measuring method for setting up object model to be measured
CN115546927A (en) UDS diagnosis automatic test system based on AUTOSAR standard
CN115576810A (en) Automatic testing method, system, medium and computing device for real-time alarm
CN114285840A (en) Vehicle data acquisition method, intelligent terminal and storage medium
CN111737065B (en) Interface test method and system of demand model based on server interface test
CN108803582B (en) Automatic bus switching system and method suitable for remote fault diagnosis
CN114780326B (en) Cross-platform calibration test method, device and equipment
CN112486819B (en) Method and system for batch testing of communication equipment
CN102708046A (en) Computer software debugging method
Hettig et al. Toolchain for architecture development, modeling and simulation of battery electric vehicles
Yu et al. Research on Automotive UDS Diagnostic Protocol Stack Test System
Dominka et al. Increasing test efficiency with automated feature-interaction-testing: Feature testing of engine ecu software
CN116150000A (en) AutoSar AP service automatic test system and method

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
GR01 Patent grant
GR01 Patent grant