Multiplexing CAN communication method based on hardware-in-the-loop test system

By using a custom DBC file conversion method, multiplexed CAN messages are simplified into a form recognizable by the HIL system, solving the problem of parsing and sending multiplexed messages in the hardware-in-the-loop test system and enabling the normal operation of the hardware-in-the-loop test system.

CN117040962BActive Publication Date: 2026-07-24ANHUI JIANGHUAI AUTOMOBILE GRP CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI JIANGHUAI AUTOMOBILE GRP CORP LTD
Filing Date
2023-09-13
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing hardware-in-the-loop test systems have poor support for multiplexed CAN communication, which makes it impossible for most bus debugging devices and mainstream test platforms to correctly parse and monitor multiplexed messages.

Method used

By using a custom DBC file conversion method, multiplexed messages are simplified into a form recognizable by the HIL system. Signal values ​​are configured and output in the hardware-in-the-loop system to achieve effective association between control signals and other data bits, ensuring correct parsing and transmission of messages.

Benefits of technology

The correct reception and transmission of multiplexed CAN messages in the hardware-in-the-loop test system was achieved, solving the problem of insufficient support from mainstream test platforms and ensuring reliable communication between the hardware-in-the-loop test system and the actual controller under test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117040962B_ABST
    Figure CN117040962B_ABST
Patent Text Reader

Abstract

The application discloses a multiplexing CAN communication method based on a hardware-in-loop test system, and according to the communication principle of multiplexing messages, the method converts data, which cannot be recognized or directly used by original HIL test equipment, into intermediate data states through a preset DBC file conversion mode on the basis of the HIL system, thereby providing feasibility for subsequent processing and signal receiving and sending. Specifically, according to the signal receiving and sending process, the data on the CAN bus is converted and associated with simulation data, correct message analysis and sending are realized, and the whole hardware-in-loop test system can be correctly operated. The application effectively solves the pain point that mainstream test platforms have poor support for multiplexing CAN messages, realizes multiplexing message receiving and sending on the test platform of this type, and reliably establishes communication between the hardware-in-loop test cabinet and a real controller under test, so that a series of related tests can be normally applied.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CAN-based hardware-in-the-loop testing, and more particularly to a multiplexed CAN communication method based on a hardware-in-the-loop testing system. Background Technology

[0002] With the development of automotive electronics technology, more and more electronic controllers are used in automobiles, requiring a large amount of data exchange between these electronic devices. To address this, CAN communication technology emerged, replacing most hard-wired signal transmissions between controllers while maintaining accurate and real-time data transmission. Current CAN communication is mainly based on protocols such as CAN2.0 and CANFD, and has already achieved widespread application in the automotive field.

[0003] Most controllers use a CAN communication method where one ID corresponds to a fixed message and a fixed parsing method, known as the typical method. Some controllers, due to their specific needs, employ multiplexed messages (a type of communication message based on the CAN2.0 / CANFD protocol. This type of message defines a "control signal" and a corresponding "controlled signal" within the message, allowing multiple signals to be transmitted through a single message with a fixed ID. The "control signal" is defined as a "multiplexor signal" in DBC, and the "controlled signal" is defined as a "multiplexedsignal" in DBC). The main difference between this and the typical method lies in the DBC parsing file. A message with one ID can contain multiple different parsing methods, offering greater flexibility and higher security. However, due to its limited application, most bus debugging devices / boards do not support this type of message and signal parsing.

[0004] In other words, CAN communication using multiplexed message types is less commonly used, and most CAN debugging equipment on the market has poor support for it. In fact, existing devices cannot properly parse and monitor this type of message using its DBC files. Furthermore, for hardware-in-the-loop testing (HIL simulation: using a real-time processor to run a simulation model to simulate the operating state of a controlled object, connected to the object under test via I / O interfaces), mainstream testing platforms such as dSPACE and NI also have poor support for multiplexed message type CAN communication, and cannot correctly receive and send this type of message using their own controls / modules. Summary of the Invention

[0005] In view of the above, the present invention aims to provide a multiplexed CAN communication method based on a hardware-in-the-loop test system to solve the aforementioned technical problems.

[0006] The technical solution adopted in this invention is as follows:

[0007] This invention provides a multiplexed CAN communication method based on a hardware-in-the-loop test system, comprising: receiving multiplexed messages and sending multiplexed messages, wherein the two are inverse processes, and the step of receiving multiplexed messages is as follows:

[0008] The DBC parsing file corresponding to the multiplexed message is simplified and converted into a form suitable for hardware-in-the-loop test equipment, wherein the multiplexed message consists of control signals and controlled signals;

[0009] Based on the simplified DBC file, CAN communication is configured through the host computer of the hardware-in-the-loop system, and a preset interface is output in the simulation model; the preset interface includes the signal value of the control signal and the values ​​of other data bits besides the control signal;

[0010] Receive the signal value from the preset interface, reassemble the other data bits, and output the target signal used by the test monitoring or closed-loop simulation model.

[0011] In at least one of the possible implementations, the control signal is simplified to have the same start bit and data length.

[0012] In at least one of the possible implementations, the controlled signal is simplified and its information is erased.

[0013] In at least one possible implementation, the DBC parsing file corresponding to the simplified multiplexed message further includes: the remaining data bits, excluding the control signals, are encoded in descending order of data priority.

[0014] In at least one possible implementation, the output preset interface in the simulation model includes: after receiving data information from the CAN communication module, writing the values ​​of the corresponding other data bits into a buffer according to the signal value of the control signal.

[0015] In at least one possible implementation, the specific process of outputting the target signal includes: selecting corresponding data from the other data bits according to the start bit and signal length of the corresponding received signal, and outputting the target signal after performing statistics on all signal values.

[0016] In at least one possible implementation, the step of sending the multiplexed message is as follows:

[0017] After the CAN signal to be transmitted is input, data conversion is performed based on the signal value of the control signal, according to the start bit and signal length of the corresponding transmission signal.

[0018] The converted data value is written to the buffer and then generated and output as a bus signal via the CAN communication module.

[0019] Compared with existing technologies, the main design concept of this invention lies in simplifying the process by using a custom DBC file conversion method on the basis of the HIL system, based on the communication principle of multiplexed messages. This transforms data that the original HIL test equipment could not recognize or directly use into an intermediate data state, providing feasibility for subsequent processing and signal reception and transmission. Specifically, according to the corresponding process of signal reception and transmission, the data on the CAN bus is converted and effectively associated with the model data, realizing the correct parsing and transmission of messages, enabling the entire hardware-in-the-loop test system to operate correctly. This invention effectively solves the pain point of poor support for multiplexed CAN messages in mainstream test platforms, realizing the reception and transmission of multiplexed messages on this type of test platform. This reliably establishes communication between the hardware-in-the-loop test cabinet and the actual controller under test, enabling a series of tests related to multiplexed CAN messages to be applied normally. Attached Figure Description

[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described below with reference to the accompanying drawings, wherein:

[0021] Figure 1 This is a schematic diagram illustrating the process of receiving multiplexed messages in a multiplexed CAN communication method based on a hardware-in-the-loop test system provided in an embodiment of the present invention. Detailed Implementation

[0022] Embodiments of the present invention 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 are only used to explain the present invention, and should not be construed as limiting the present invention.

[0023] It should be noted that the automotive HIL system involved in this invention includes: a real controller under test, a host computer, and a hardware-in-the-loop simulation cabinet. The host computer carries relevant application software corresponding to the HIL simulation cabinet; the HIL simulation cabinet includes: a real-time host, I / O boards, and CAN communication boards; the host computer and the HIL simulation cabinet communicate in real time via Ethernet; the HIL simulation cabinet is connected to the real controller under test via a wiring harness.

[0024] The host computer uses Simulink to build a communication model, which is then compiled and downloaded to the real-time machine via Ethernet cable. The real-time machine drives the communication board in the HIL simulation cabinet to realize the transmission and reception of CAN messages / signals.

[0025] Based on this, the implementation of the following scheme of the present invention is mainly undertaken by the Simulink model module in the host computer and the CAN communication module in the HIL test cabinet. In addition to the above-mentioned hardware bench connection, it also uses the corresponding host computer software of the HIL test cabinet. The "CAN communication module" is a CAN board integrated tool module based on Simulink, which can output the signal value corresponding to the imported DBC file. The signal processing module involved in the present invention can be a pre-developed conversion model or code for multiplexed messages. Its function is to convert the multiplexed CAN signal and output the correct signal value.

[0026] Specifically, this invention proposes an embodiment of a multiplexed CAN communication method based on a hardware-in-the-loop test system, as follows: Figure 1 As shown, this includes: receiving multiplexed messages and sending multiplexed messages. The step of receiving multiplexed messages is as follows:

[0027] Step S1: Simplify the DBC parsing file corresponding to the multiplexed message and convert it into a form suitable for hardware-in-the-loop test equipment (that is, a regular DBC form that can be recognized by the device in the HIL system), wherein the multiplexed message consists of control signals and controlled signals.

[0028] As mentioned earlier, in this type of multiplexed communication message, on the one hand, the "control signal," which is defined as a "multiplexor signal" in DBC, is retained in the simplified DBC after this step, and has the same start bit and data length. On the other hand, the "controlled signal," defined as a "multiplexed signal" in DBC, is the specific signal that needs to be transmitted in the multiplexed message. In the simplified DBC file after this step, all "controlled signal" information is erased and not displayed. At the same time, the remaining data bits (bits) other than the "control signal" are encoded according to data priority from high to low, such as: M1, M2, M3... Here, the following table is an example of a DBC file in Motorola format (the blank part in the table is the "control signal," which has a length of 16 bits):

[0029] M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 M12 M13 M14 M15 M16 M17 M18 M19 M20 M21 M22 M23 M24 M25 M26 M27 M28 M29 M30 M31 M32 M33 M34 M35 M36 M37 M38 M39 M40 M41 M42 M43 M44 M45 M46 M47 M48

[0030] Step S2: Based on the simplified DBC file, configure CAN communication through the host computer of the hardware-in-the-loop system and output a preset interface in the simulation model; the preset interface includes the signal value of the control signal and the values ​​of other data bits (bits) besides the control signal.

[0031] Specifically, the preset output interface in the simulation model includes: after receiving data information from the CAN communication module, writing the data values ​​of the corresponding other data bits into the buffer according to the signal value of the control signal.

[0032] Step S3: Receive the signal value of the preset interface, reassemble the other data bits, and output the target signal used by the test monitoring or closed-loop simulation model.

[0033] The specific process in this step can be as follows: based on the start bit and signal length of the received signal corresponding to each control signal, select the corresponding data from the other data bits, and output the target signal after performing statistics on all signal values.

[0034] Based on the above process, the correct reception and use of multiplexed messages in the HIL test system can be achieved.

[0035] As mentioned earlier, due to the communication characteristics of the actual controller under test, there is also the possibility that it needs to receive multiplexed messages from the HIL test system. In addition to being able to correctly receive this type of message in the manner described above, the HIL test system also needs to have the ability to send messages.

[0036] The process of sending multiplexed messages is similar to that of receiving multiplexed messages, and can be basically regarded as the reversal of the receiving process. This invention will not elaborate on this, but the following can be referred to in specific implementation:

[0037] After the CAN signal to be transmitted is input, data conversion is performed based on the signal value of the control signal, according to the start bit and signal length of the corresponding transmission signal.

[0038] The converted data value is written to the buffer and then generated and output as a bus signal via the CAN communication module.

[0039] In summary, the main design concept of this invention lies in simplifying the complex by using a custom DBC file conversion method on the basis of the HIL system, based on the communication principle of multiplexed messages. This transforms data that the original HIL test equipment could not recognize or directly use into an intermediate data state, providing feasibility for subsequent processing and signal reception and transmission. Specifically, according to the corresponding process of signal reception and transmission, the data on the CAN bus is converted and effectively associated with the model data, achieving correct message parsing and transmission, enabling the entire hardware-in-the-loop test system to operate correctly. This invention effectively solves the pain point of poor support for multiplexed CAN messages in mainstream test platforms, realizing the reception and transmission of multiplexed messages on this type of test platform. This reliably establishes communication between the hardware-in-the-loop test cabinet and the actual controller under test, enabling a series of tests related to multiplexed CAN messages to be applied normally.

[0040] In this embodiment of the invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0041] The above description of the structure, features, and effects of the present invention is based on the embodiments shown in the figures. However, the above are only preferred embodiments of the present invention. It should be noted that the technical features involved in the above embodiments and their preferred methods can be reasonably combined and matched by those skilled in the art to form a variety of equivalent solutions without departing from or changing the design concept and technical effects of the present invention. Therefore, the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A multiplexed CAN communication method based on a hardware-in-the-loop test system, characterized in that, include: The process of receiving and sending multiplexed messages is the reverse of receiving and sending multiplexed messages. The steps for receiving multiplexed messages are as follows: The DBC parsing file corresponding to the multiplexed message is simplified and converted into a format suitable for hardware-in-the-loop test equipment. The multiplexed message consists of control signals and controlled signals. The simplification includes a custom DBC file conversion method based on the communication principle of the multiplexed message and the HIL system. Specifically, all controlled signals in the multiplexed message are removed, and while retaining the control signals in the multiplexed message, the remaining data bits other than the control signals are encoded according to the data priority from high to low to obtain the intermediate data state that the HIL test equipment can recognize or directly use. Based on the simplified DBC file, CAN communication is configured through the host computer of the hardware-in-the-loop system, and a preset interface is output in the simulation model; the preset interface includes the signal value of the control signal and the values ​​of other data bits besides the control signal; Receive the signal value from the preset interface, reassemble the other data bits, and output the target signal used by the test monitoring or closed-loop simulation model.

2. The multiplexed CAN communication method based on a hardware-in-the-loop test system according to claim 1, characterized in that, The simplified control signals have the same start bit and data length.

3. The multiplexed CAN communication method based on a hardware-in-the-loop test system according to claim 1, characterized in that, The simulation model outputs a preset interface including: after receiving data information from the CAN communication module, writing the values ​​of the corresponding other data bits into a buffer according to the signal value of the control signal.

4. The multiplexed CAN communication method based on a hardware-in-the-loop test system according to claim 1, characterized in that, The specific process of outputting the target signal includes: selecting corresponding data from the other data bits according to the start bit and signal length of the corresponding received signal, and outputting the target signal after performing statistics on all signal values.

5. The multiplexed CAN communication method based on a hardware-in-the-loop test system according to any one of claims 1 to 4, characterized in that, The steps for sending the multiplexed message are as follows: After the CAN signal to be transmitted is input, data conversion is performed based on the signal value of the control signal, according to the start bit and signal length of the corresponding transmission signal. The converted data value is written to the buffer and then generated and output as a bus signal via the CAN communication module.

Citation Information

Patent Citations

  • CN113867318A