Hardware-in-the-loop test system, method, and storage medium

CN116466684BActive Publication Date: 2026-08-21CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310439196.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-08-21
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

[0004]本申请提供一种硬件在环测试系统、方法及存储介质,以解决相关技术部署到实时机中的以太网协议栈需要做图形化转换,工作量大,还需要验证转换前后功能是否一致,且主机厂硬件在环测试系统自主开发能力过度依赖于厂家等问题

Benefits of technology

[0024]1、本申请实施例可以通过实时机对被测对象进行通信总线和/或模数信号测试,上位机上部署有以太网协议栈封装得到的封装模块,通过封装模块下发第二测试控制指令至被测对象,以实现被测对象的硬件在环测试。由此,部署到上位机中的以太网协议栈无需做图形化转换,避免增加额外的工作量,而且协议栈本身使用的是普通封装方式,针对协议栈的每一次变更,主机厂对硬件在环测试系统都可以自主完成快速调整与集成,摆脱了对硬件在环厂家的依赖,提高了自主开发能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116466684B_ABST
    Figure CN116466684B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of automobile testing, in particular to a hardware-in-the-loop test system and method and a storage medium, wherein the system comprises a measured object, a real-time machine and an upper computer; the real-time machine is used for communication bus and / or analog-digital signal test on the measured object; the upper computer is used for issuing a first test control instruction to the real-time machine, the upper computer is provided with a packaging module obtained by packaging an Ethernet protocol stack, a second test control instruction is issued to the measured object through the packaging module, and the test result of the measured object is acquired through the packaging module, so that hardware-in-the-loop test of the measured object is realized. Therefore, the problems that the Ethernet protocol stack deployed into the real-time machine needs to be graphically converted, the workload is large, the consistency of functions before and after conversion needs to be verified, and the self-development capability of the hardware-in-the-loop test system of the host factory excessively depends on the manufacturer are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive testing technology, and in particular to a hardware-in-the-loop testing system, method, and storage medium. Background Technology

[0002] With the increasing trend of intelligent and connected vehicles in recent years, there are growing demands for communication buses to meet requirements such as high bandwidth, real-time performance, stability, and distributed operation. Hardware-in-the-loop (HIL) test systems have become an important part of the automotive electronic controller development process. They connect to the controller under test (DUT) and physical loads through I / O (input / output) communication interfaces (CAN, automotive Ethernet, etc.) to perform comprehensive system testing on the DUT.

[0003] Related technologies typically involve integrating the protocol stack into the real-time machine to achieve hardware-in-the-loop testing of the object under test. However, most real-time machine programming methods are graphical. When deploying the Ethernet protocol stack to the real-time machine, there is a conversion process from text-based to graphical programming, which not only increases a lot of work but also requires verification of whether the functions are consistent before and after the conversion. Moreover, the real-time machine systems of mainstream manufacturers in the industry are very closed. For example, NI's real-time machine requires the use of NIVeriStand for task programming or deployment, which is highly dependent on the technical support of the corresponding manufacturer. Summary of the Invention

[0004] This application provides a hardware-in-the-loop testing system, method, and storage medium to address issues such as the need for graphical conversion of Ethernet protocol stacks deployed in real-time machines, the large workload involved, the need to verify the consistency of functions before and after conversion, and the excessive reliance of OEMs on manufacturers for the independent development capabilities of hardware-in-the-loop testing systems.

[0005] A first aspect of this application provides a hardware-in-the-loop testing system, comprising: a device under test (DUT); a real-time machine (RTM) for testing the DUT's communication bus and / or analog-to-digital signals; and a host computer for issuing a first test control command to the RTM, wherein the host computer is equipped with an encapsulation module obtained by encapsulating an Ethernet protocol stack, and issues a second test control command to the DUT through the encapsulation module, and obtains the test results of the DUT through the encapsulation module, thereby realizing hardware-in-the-loop testing of the DUT.

[0006] Based on the aforementioned technical means, this embodiment of the application can perform communication bus and / or analog-to-digital signal testing on the object under test (DUT) via a real-time machine. An encapsulation module, derived from an Ethernet protocol stack, is deployed on the host computer. The encapsulation module sends a second test control command to the DUT to achieve hardware-in-the-loop testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, avoiding additional workload. Furthermore, the protocol stack itself uses a standard encapsulation method, allowing OEMs to independently and quickly adjust and integrate the hardware-in-the-loop testing system for each change in the protocol stack, eliminating dependence on hardware-in-the-loop manufacturers and improving independent development capabilities.

[0007] Optionally, in one embodiment of this application, the encapsulation module is a module obtained by packaging the Ethernet protocol stack into a library file or a dynamic link library.

[0008] Based on the above technical means, the implementation of this application only requires using ordinary encapsulation methods to package the protocol stack into library files, dynamic link libraries and other modules that can be called by the automatic test control software in the host computer, thus eliminating the dependence of the hardware-in-the-loop test system's integrated Ethernet protocol stack on the closed real-time machine system.

[0009] Optionally, in one embodiment of this application, the encapsulation module includes a monitoring module and a communication module, wherein the communication module is used to send the second test control command to the object under test to perform in-loop testing on the hardware of the object under test, and the monitoring module is used to monitor the test results of the in-loop testing of the hardware of the object under test.

[0010] Based on the above technical means, the embodiments of this application can use the communication module to issue test commands and use the monitoring module to monitor the hardware of the object under test to perform in-loop testing, so as to realize comprehensive system testing of the object under test.

[0011] Optionally, in one embodiment of this application, the encapsulation module is further used to filter communication information between the host computer and the real-time machine, and between the host computer and the object under test, where the communication delay is greater than a preset duration.

[0012] Based on the above technical means, the embodiments of this application can filter communication information that exceeds a preset duration to ensure the accuracy of test results.

[0013] Optionally, in one embodiment of this application, the host computer is further equipped with a control module for issuing a first test control command to the real-time machine to perform communication bus and / or analog-to-digital signal tests on the object under test.

[0014] Based on the above technical means, the embodiments of this application can use a real-time machine to perform communication bus and / or analog-to-digital signal testing on the object under test.

[0015] Optionally, in one embodiment of this application, the host computer further includes a first network port and a second network port, wherein the first network port is connected to the real-time machine via a first Ethernet bus, and the second network port is connected to the object under test via a second Ethernet bus.

[0016] Based on the above technical means, the embodiments of this application can utilize the first network port and the second network port to realize bidirectional data flow from the automatic test control software in the host computer to the object under test.

[0017] Optionally, in one embodiment of this application, the host computer is further deployed with automatic test control software for testing the object under test.

[0018] Based on the above technical means, the embodiments of this application can test the object under test through automatic test control software, which has high accuracy and improves test efficiency.

[0019] Optionally, in one embodiment of this application, the automatic test control software communicates with the encapsulation module via an application programming interface (API).

[0020] Based on the above technical means, the embodiments of this application utilize the application programming interface (API) to realize mutual communication between the automatic test control software and the packaging module, thereby achieving the purpose of testing the object under test.

[0021] A second aspect of this application provides a hardware-in-the-loop testing method. The method uses a hardware-in-the-loop testing system as described in any of the above embodiments. The method includes the following steps: acquiring a first test control instruction and a second test control instruction for the object under test (DUT); sending the first test control instruction to the real-time machine to perform communication bus and / or analog-to-digital signal testing on the DUT; sending the second test control instruction to the DUT through the encapsulation module, and acquiring the test results of the DUT through the encapsulation module, thereby realizing hardware-in-the-loop testing of the DUT. The encapsulation module encapsulates an Ethernet protocol stack.

[0022] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the hardware-in-the-loop testing method as described in the above embodiments.

[0023] Therefore, this application has at least the following beneficial effects:

[0024] 1. This application embodiment can perform communication bus and / or analog-to-digital signal testing on the object under test (DUT) via a real-time machine. An encapsulation module, derived from an Ethernet protocol stack, is deployed on the host computer. The encapsulation module sends a second test control command to the DUT to achieve hardware-in-the-loop testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, avoiding additional workload. Furthermore, the protocol stack itself uses a standard encapsulation method, allowing OEMs to independently and quickly adjust and integrate the hardware-in-the-loop testing system for each change in the protocol stack, eliminating dependence on hardware-in-the-loop manufacturers and improving independent development capabilities.

[0025] 2. This application only requires the use of ordinary encapsulation methods to package the protocol stack into library files, dynamic link libraries and other modules that can be called by the automatic test control software in the host computer, thus eliminating the dependence of the hardware-in-the-loop test system on the real-time machine closed system for integrating the Ethernet protocol stack.

[0026] 3. In this embodiment of the application, the communication module can be used to issue test commands, and the monitoring module can be used to monitor the hardware of the object under test to perform in-loop testing, so as to realize comprehensive system testing of the object under test.

[0027] 4. The embodiments of this application can filter communication information that exceeds a preset duration to ensure the accuracy of test results.

[0028] 5. The embodiments of this application can utilize a real-time machine to perform communication bus and / or analog-to-digital signal testing on the object under test.

[0029] 6. In this embodiment of the application, the first network port and the second network port can be used to realize bidirectional data flow from the automatic test control software in the host computer to the object under test.

[0030] 7. The embodiments of this application can use automatic test control software to test the object under test, which has high accuracy and improves test efficiency.

[0031] 8. The embodiments of this application utilize the application programming interface (API) to realize the mutual communication between the automatic test control software and the encapsulation module, thereby achieving the purpose of testing the object under test.

[0032] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0033] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0034] Figure 1This is a block diagram of a hardware-in-the-loop testing system according to an embodiment of this application;

[0035] Figure 2 This is a block diagram of a hardware-in-the-loop test system provided according to an embodiment of this application;

[0036] Figure 3 This is a flowchart of a hardware-in-the-loop testing method provided according to an embodiment of this application. Detailed Implementation

[0037] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0038] The hardware-in-the-loop testing system, method, and storage medium of this application are described below with reference to the accompanying drawings. Addressing the problems mentioned in the background section, this application provides a hardware-in-the-loop testing system that performs communication bus and / or analog-to-digital signal testing on the object under test (DUT) using a real-time machine. An encapsulation module, derived from an Ethernet protocol stack, is deployed on the host computer. The encapsulation module sends a second test control command to the DUT to achieve hardware-in-the-loop testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, avoiding additional workload. Furthermore, the protocol stack itself uses a common encapsulation method, allowing OEMs to independently and quickly adjust and integrate the hardware-in-the-loop testing system for each change in the protocol stack, eliminating dependence on hardware-in-the-loop manufacturers and improving independent development capabilities. This solves the problems of related technologies where deploying Ethernet protocol stacks to a real-time machine requires graphical conversion, resulting in a large workload and the need to verify the consistency of functions before and after conversion, and where OEMs' hardware-in-the-loop testing system development capabilities are overly reliant on manufacturers.

[0039] Specifically, Figure 1 This is a block diagram of a hardware-in-the-loop test system provided in an embodiment of this application.

[0040] like Figure 1 As shown, the hardware-in-the-loop test system 10 includes: the object under test 100, the real-time machine 200, and the host computer 300.

[0041] The real-time machine 200 is used to perform communication bus and / or analog-to-digital signal tests on the object under test 100; the host computer 300 is used to send the first test control command to the real-time machine 200, and the host computer 300 is equipped with an encapsulation module obtained by encapsulating the Ethernet protocol stack. The host computer 300 sends the second test control command to the object under test 100 through the encapsulation module, and obtains the test results of the object under test 100 through the encapsulation module, so as to realize the hardware-in-the-loop test of the object under test 100.

[0042] Understandably, the device under test (DUT) is tested via a real-time machine for communication bus and / or analog-to-digital signals. The host computer deploys an encapsulation module, derived from an Ethernet protocol stack, which sends second test control commands to the DUT to achieve hardware-in-the-loop testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, thus avoiding both additional workload and inconsistencies arising from the conversion between text-based and graphical programs.

[0043] In one embodiment of this application, the encapsulation module is a module obtained by packaging the Ethernet protocol stack into a library file or a dynamic link library. The host computer also deploys automatic test control software for testing the object under test. The automatic test control software communicates with the encapsulation module through an application programming interface (API).

[0044] In one embodiment of this application, the host computer is further equipped with a control module for sending a first test control command to the real-time machine to perform communication bus and / or analog-to-digital signal tests on the object under test.

[0045] like Figure 2 As shown, in this embodiment, the automotive Ethernet protocol stack (which may include upper-layer encapsulation, implemented in .lib, .dll, etc.) is deployed in a host computer. The automatic test control software communicates with the protocol stack in the host computer via API. This eliminates the need to deploy the Ethernet protocol stack in a real-time machine. Instead, the protocol stack (which may include upper-layer application encapsulation) is packaged into library files, dynamic link libraries, and other modules that can be called by the automatic test control software (such as Python) in the host computer using a common encapsulation method. This eliminates the dependency of the hardware-in-the-loop test system integrating the Ethernet protocol stack on the closed real-time machine system. The first test control command is issued to the real-time machine through the control module deployed in the host computer. The real-time machine still only performs tests on communication buses such as CAN and LIN, and tests on analog / digital quantities, such as current testing and switching quantity testing.

[0046] It should be noted that, since the protocol stack itself uses a common encapsulation method, the OEM can independently and quickly adjust and integrate the hardware-in-the-loop test system for each change to the protocol stack, thereby eliminating dependence on hardware-in-the-loop manufacturers and improving independent development capabilities.

[0047] In one embodiment of this application, the host computer further includes a first network port and a second network port.

[0048] like Figure 2 As shown, the first network port is connected to the real-time machine via the first Ethernet bus, and the second network port is connected to the object under test via the second Ethernet bus. Both the first and second network ports can convert standard Ethernet to automotive Ethernet. In actual operation, the second network port connects to the object under test via the second Ethernet bus, enabling bidirectional data flow from the automatic test control software in the host computer to the object under test.

[0049] In one embodiment of this application, the encapsulation module is further used to filter communication information between the host computer and the real-time machine, and between the host computer and the object under test, where the communication delay is greater than a preset duration.

[0050] The preset duration can be set according to actual needs, such as 2 seconds, without any specific limit.

[0051] This application embodiment can filter communication information with a delay greater than 2 seconds between the host computer and the real-time machine, and between the host computer and the object under test, to ensure the accuracy of the test results.

[0052] In one embodiment of this application, the encapsulation module includes a monitoring module and a communication module.

[0053] The communication module is used to send the second test control command to the object under test to perform in-loop testing on the hardware of the object under test, and the monitoring module is used to monitor the test results of the in-loop testing on the hardware of the object under test.

[0054] For ease of explanation, the embodiments of this application can be described in detail with reference to a specific test. Specifically, the embodiments of this application can call the communication module (selected as Sub or Pub according to the test requirements) to call the headlight turn-on service, and verify that the headlight is actually turned on by controlling the RT to measure the voltage of the headlight, and by calling the monitoring module, which is Subscriber, to continuously observe the headlight status of the DUT to determine whether the headlight loop-in test is successful.

[0055] The hardware-in-the-loop (HIL) testing system proposed in this application uses a real-time machine to test the communication bus and / or analog-to-digital signals of the object under test (DUT). An encapsulation module, derived from an Ethernet protocol stack, is deployed on the host computer. This encapsulation module sends second test control commands to the DUT to achieve HIL testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, avoiding additional workload. Furthermore, the protocol stack itself uses a standard encapsulation method, allowing OEMs to quickly adjust and integrate the HIL testing system independently for each change in the protocol stack, eliminating reliance on HIL vendors and improving independent development capabilities. This solves the problems associated with deploying Ethernet protocol stacks in real-time machines, such as the need for graphical conversion, the large workload, the requirement to verify functional consistency before and after conversion, and the excessive reliance of OEMs on vendors for independent development of HIL testing systems.

[0056] Next, referring to the accompanying drawings, a hardware-in-the-loop testing method according to an embodiment of this application is described, the method using a hardware-in-the-loop testing system as described in any of the above embodiments.

[0057] like Figure 3 As shown, the hardware-in-the-loop testing method includes the following steps:

[0058] In step S101, the first test control command and the second test control command of the object under test are obtained.

[0059] In step S102, a first test control command is sent to the real-time machine to perform communication bus and / or analog-to-digital signal tests on the object under test.

[0060] In step S103, the second test control command is sent to the object under test through the encapsulation module, and the test result of the object under test is obtained through the encapsulation module, so as to realize the hardware-in-the-loop test of the object under test. The encapsulation module encapsulates the Ethernet protocol stack.

[0061] It should be noted that the foregoing explanation of the hardware-in-the-loop test system embodiment also applies to the hardware-in-the-loop test method of this embodiment, and will not be repeated here.

[0062] According to the hardware-in-the-loop testing method proposed in this application, the communication bus and / or analog-to-digital signal of the object under test (DUT) are tested through a real-time machine. An encapsulation module, obtained by encapsulating an Ethernet protocol stack, is deployed on the host computer. The encapsulation module sends a second test control command to the DUT to achieve hardware-in-the-loop testing. Therefore, the Ethernet protocol stack deployed on the host computer does not require graphical conversion, avoiding additional workload. Furthermore, the protocol stack itself uses a common encapsulation method, allowing OEMs to independently and quickly adjust and integrate the hardware-in-the-loop testing system for each change in the protocol stack, eliminating dependence on hardware-in-the-loop manufacturers and improving independent development capabilities. This solves the problems of related technologies requiring graphical conversion of the Ethernet protocol stack deployed to a real-time machine, resulting in a large workload, the need to verify the consistency of functions before and after conversion, and the excessive reliance of OEMs on manufacturers for independent development capabilities of their hardware-in-the-loop testing systems.

[0063] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the hardware-in-the-loop testing method described above.

[0064] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0065] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0066] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0067] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0068] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

Claims

1. A hardware-in-the-loop testing system, characterized in that, include: The object being tested; A real-time machine is used to perform communication bus and / or analog-to-digital signal testing on the object under test. The host computer is used to send the first test control command to the real-time machine. The host computer is also equipped with an encapsulation module obtained by encapsulating the Ethernet protocol stack. The host computer sends the second test control command to the object under test through the encapsulation module and obtains the test results of the object under test through the encapsulation module, so as to realize the hardware-in-the-loop test of the object under test. The host computer also includes a first network port and a second network port, wherein the first network port is connected to the real-time machine through a first Ethernet bus, and the second network port is connected to the object under test through a second Ethernet bus; the host computer also deploys automatic test control software for testing the object under test; the automatic test control software communicates with the encapsulation module through an application programming interface (API); The first network port and the second network port are used to convert standard Ethernet to automotive Ethernet, and the second network port is connected to the object under test through the second Ethernet bus to realize bidirectional data flow from the automatic test control software in the host computer to the object under test.

2. The hardware-in-the-loop test system according to claim 1, characterized in that, The encapsulation module is a module obtained by packaging the Ethernet protocol stack into a library file or a dynamic link library.

3. The hardware-in-the-loop test system according to claim 1 or 2, characterized in that, The encapsulation module includes a monitoring module and a communication module. The communication module is used to send the second test control command to the object under test to perform in-loop testing on the hardware of the object under test. The monitoring module is used to monitor the test results of the in-loop testing of the hardware of the object under test.

4. The hardware-in-the-loop test system according to claim 1 or 2, characterized in that, The encapsulation module is further used to filter communication information between the host computer and the real-time machine, and between the host computer and the object under test, where the communication delay is greater than a preset duration.

5. The hardware-in-the-loop test system according to claim 1, characterized in that, The host computer is also equipped with a control module, which is used to send the first test control command to the real-time machine to perform communication bus and / or analog-to-digital signal tests on the object under test.

6. A hardware-in-the-loop testing method, characterized in that, The method uses the hardware-in-the-loop test system as described in any one of claims 1-5, wherein the method includes the following steps: Obtain the first and second test control commands of the object under test; The first test control command is sent to the real-time machine to perform communication bus and / or analog-to-digital signal testing on the object under test; The encapsulation module sends a second test control command to the object under test and obtains the test results of the object under test to realize hardware-in-the-loop testing of the object under test. The encapsulation module encapsulates an Ethernet protocol stack.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the hardware-in-the-loop testing method as described in claim 6.

Citation Information

Patent Citations

  • Device, system and method for synchronously and automatically testing automotive equipment

    CN104484247A

  • System and method for virtualization of networking system software via emulation

    US8600726B1