A device and method for detecting a sampling point of a CANFD bus

CN117955855BActive Publication Date: 2026-10-23SHANGHAI CAIAIFU STEERING SYST WUHAN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211343694.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-10-23
Estimated Expiration
2042-10-31

AI Technical Summary

Benefits of technology

[0014]本发明同现有技术相比,提供一种CANFD总线采样点检测装置及方法,能够稳定可靠地识别CANFD采样点及其偏差范围分布,为后续更进一步提高采样点置信度,以及为确认采样点一致性提供了判断依据,对保证节点通讯稳定性、可靠性有重要意义。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117955855B_ABST
    Figure CN117955855B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of steering systems, in particular to a CANFD bus sampling point detection device and method. A computing module comprises a first computing module and a second computing module; the output end of a message collection module is connected with the input end of a data recording module; the output end of the data recording module is connected with the input end of a message generation module, the second computing module and an interaction module respectively; the output end of the second computing module is connected with the input end of the interaction module; the output end of the interaction module is connected with the input end of the first computing module; the output end of the first computing module is connected with the input end of the message generation module; the output end of the message generation module is connected with the input end of a message sending module; and the output end of a bit width stepping module is connected with the input end of the message generation module and the data recording module respectively. Compared with the prior art, the CANFD sampling point and its deviation range distribution can be stably and reliably recognized, and the sampling point confidence can be further improved subsequently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of steering system technology, specifically to a CANFD bus sampling point detection device and method. Background Technology

[0002] In the automotive field, with the development of automotive network technology and the increasing demand for human-machine interaction, higher requirements are being placed on system bandwidth. However, the traditional CAN bus has limitations due to bandwidth constraints. Therefore, the CANFD bus, based on the CAN bus, has emerged. The CANFD bus has improved in terms of data transmission rate and length, and is being used more and more widely in automotive network communication.

[0003] The automotive network communication environment is complex, and inconsistent sampling points can lead to data transmission errors, causing network failures and posing significant security risks to the bus network. While there is considerable research on CAN sampling point testing, CANFD applications are still immature, and testing experience and methods for its sampling points are lacking. CANFD sampling point testing is more complex than CAN because CANFD involves switching transmission rates, requiring comprehensive consideration of the sampling points of the CANFD message arbitration segment and data segment. Summary of the Invention

[0004] To overcome the shortcomings of the prior art, this invention provides a CANFD bus sampling point detection device and method, which can reliably identify CANFD sampling points and their deviation range distribution. This provides a basis for further improving the confidence of sampling points and confirming the consistency of sampling points, and is of great significance for ensuring the stability and reliability of node communication.

[0005] To achieve the above objectives, a CANFD bus sampling point detection device and method are designed, comprising an interaction module, a calculation module, a data recording module, a message generation module, a message sending module, a message acquisition module, and a bit-width stepping module. The calculation module includes a first calculation module and a second calculation module. The output of the message acquisition module is connected to the input of the data recording module. The output of the data recording module is connected to the inputs of the message generation module, the second calculation module, and the interaction module. The output of the second calculation module is connected to the input of the interaction module. The output of the interaction module is connected to the input of the first calculation module. The output of the first calculation module is connected to the input of the message generation module. The output of the message generation module is connected to the input of the message sending module. The output of the bit-width stepping module is connected to the inputs of both the message generation module and the data recording module. The CANFD bus sampling point detection method is as follows: Step 1: Simulate CANFD bus communication, connect the test device and the device under test simultaneously, ensure normal communication, and perform sampling point testing on the device under test; Step 2: Set the sending message sampling point, BTL, message period, and specific message ID. First, set BRS to 0 (dominant bit) through the message generation module. At this time, the transmission rate of the sampling points of the arbitration segment and the data segment is the same. Select the dominant bit in the CRC sequence "recessive-dominant-recessive" as the test bit and generate a CANFD test message. Step 3: Send the CANFD test message from the message generation module in Step 2 to the analog bus connected to the device under test, according to the number of interferences, the number of interference frames, and the interference interval. Step 4: Collect the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the analog bus after each frame is sent. The data recording module records the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 5: For the "recessive-dominant-recessive" CRC sequence in Step 2, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the overall frame length unchanged, and the message generation module regenerates the CANFD test message. Step 6: Send the CANFD test message from the message generation module in Step 5 to the analog bus where the node under test is located, with the same number of interferences, number of interference frames, and interference interval. Step 7: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the arbitration segment sampling point. After the dominant bit length test ends, the dominant bit width is shortened by 1% and the test is repeated. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. The data recording module records the percentage of dominant bit length without an error frame as the ending position of the arbitration segment sampling point and ends the test. Step 8: Using the second calculation module and the interaction module, obtain the distribution map of the range and probability of the sampling points in the arbitration section of the device under test based on the test results; Step 9: According to the process in Step 2, set BRS to 1 (dominant bit). At this time, the data segment will switch baud rates. The transmission rate is inconsistent with that of the arbitration segment. The "recessive-dominant-recessive" CRC sequence is still selected to generate a CANFD test message. Step 10: Send the CANFD test message from the message generation module in Step 9 to the analog bus where the node under test is located, according to the number of interferences, number of interference frames, and interference interval. Step 11: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the analog bus after each frame is sent, and record the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 12: For the "recessive-dominant-recessive" CRC sequence in Step 9, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the length of the entire frame unchanged, and regenerate the CANFD test message. Step 13: Send the CANFD test message from the message generation module in Step 12 to the bus of the node under test with the same number of interferences, number of interference frames, and interference interval. The message acquisition module collects the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the data segment sampling point. After the dominant bit length test ends, shorten the dominant bit width by 1% and retest. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. Record the percentage of dominant bit length when there is no error frame as the ending position of the data segment sampling point and end the test. Step 14: Through the second calculation module and the interaction module, based on the test results, the distribution map of the range and probability of the sampling points of the data segment of the device under test can be obtained.

[0006] The first calculation module: In the CANFD message data frame, the CRC sequence is obtained by verifying the SOF, arbitration field, control field, data field, and stuff count using a specific CRC algorithm. Once the BRS bit is determined, the CRC sequence can be made to have a "recessive-dominant-recessive" sequence by changing the content of the data field.

[0007] The message generation module, based on the results from the first calculation module, selects the dominant bit in the sequence as the test bit according to the different BRS bits and the set message period, sampling point, and TQ number (BTL Cycles) information, and generates a CANFD test message with a specific ID.

[0008] The message sending module sends the CANFD test message from the message generation module to the analog bus where the node under test is located, according to the number of interferences and the number of interference frames. There is a certain interval after each interference. During the interval, a normal message is sent to ensure that the device under test is in an active error state. When the bit width step reaches a certain position, the device under test has no error response, the test ends and no more CANFD test messages are sent.

[0009] The bit width stepping module: according to the set step interval percentage, fine-tunes the length of the CRC dominant bit in the "recessive-dominant-recessive" sequence, so that the forward length is shortened successively, resulting in the length of the next recessive bit being increased successively, while ensuring that the length of the entire frame message remains unchanged.

[0010] The aforementioned message acquisition module monitors the CANFD message status on the analog bus and receives response messages sent by the device under test.

[0011] The data recording module is used to record the bit width position where the error response occurs and the corresponding number of error responses after each bit width step. After each CANFD message frame is sent to the analog bus, the device under test may issue an error response due to CRC error.

[0012] The second calculation module: By recording the number of error responses through the data recording module, the proportion of error counts under different dominant bit widths can be obtained. By combining the starting position of the sampling point where the error frame occurs and the ending position of the sampling point where the error frame ends, a distribution map of the range and probability of the sampling points of the arbitration segment and data segment of the CANFD message of the device under test can be obtained.

[0013] The interactive module interacts with the host computer, generates corresponding CANFD test messages through the first calculation module and message generation module according to the parameters set by the host computer, and feeds back the second calculation module to the host computer, so as to display the distribution range and probability of the sampling points of the CANFD message arbitration segment and data segment on the host computer.

[0014] Compared with the prior art, the present invention provides a CANFD bus sampling point detection device and method, which can reliably identify CANFD sampling points and their deviation range distribution, providing a basis for further improving the confidence of sampling points and confirming the consistency of sampling points, which is of great significance for ensuring the stability and reliability of node communication. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the module connection of the present invention.

[0016] Figure 2 This is a schematic diagram of a CANFD message data frame.

[0017] Figure 3 This is a schematic diagram of the CRC dominant bit length in a "hidden-dominant-hidden" sequence.

[0018] Figure 4 This is a schematic diagram showing the connection between the testing device and the device under test. Detailed Implementation

[0019] The present invention will now be further described with reference to the accompanying drawings.

[0020] like Figure 1 As shown, the calculation module includes a first calculation module and a second calculation module. The output of the message acquisition module is connected to the input of the data recording module. The output of the data recording module is connected to the inputs of the message generation module, the second calculation module, and the interaction module. The output of the second calculation module is connected to the input of the interaction module. The output of the interaction module is connected to the input of the first calculation module. The output of the first calculation module is connected to the input of the message generation module. The output of the message generation module is connected to the input of the message sending module. The output of the bit-width stepping module is connected to the inputs of the message generation module and the data recording module.

[0021] First calculation module: In the CANFD message data frame, the CRC sequence is obtained by verifying the SOF, arbitration field, control field, data field, and stuff count using a specific CRC algorithm. Once the BRS bit is determined, the CRC sequence can be made to have a "recessive-dominant-recessive" sequence by changing the content of the data field.

[0022] Message generation module: Based on the results described by the first calculation module, according to the different BRS bits and the set message period, sampling points, and TQ number (BTL Cycles) information, the dominant bit in the sequence is selected as the test bit to generate a CANFD test message with a specific ID.

[0023] Message sending module: Sends the CANFD test message from the message generation module to the analog bus where the node under test is located according to the number of interferences and interference frames. There is a certain interval after each interference. During the interval, a normal message is sent to ensure that the device under test is in an active error state. When the bit width step reaches a certain position, the device under test has no error response, the test ends and no more CANFD test messages are sent.

[0024] Bit width stepping module: According to the set step interval percentage, it fine-tunes the length of the CRC dominant bit in the "recessive-dominant-recessive" sequence, so that the length of the preceding bit is shortened successively, resulting in the length of the subsequent recessive bit being increased successively. It is necessary to ensure that the length of the entire frame message remains unchanged.

[0025] Message acquisition module: monitors the CANFD message status on the analog bus and receives response messages sent by the device under test.

[0026] Data logging module: After each CANFD message frame is sent to the analog bus, the device under test may issue an error response due to CRC error. This module is used to record the bit width position where the error response occurs and the corresponding number of error responses after each bit width step.

[0027] The second calculation module: By recording the number of error responses through the data recording module, the proportion of error counts under different dominant bit widths can be obtained. By combining the starting position of the sampling point where the error frame occurs and the ending position of the sampling point where the error frame ends, the distribution range and probability of the sampling points of the arbitration segment and data segment of the CANFD message of the device under test can be obtained.

[0028] Interaction Module: Interacts with the host computer. Based on the parameters set by the host computer, it generates the corresponding CANFD test message through the first calculation module and the message generation module, and feeds back the second calculation module to the host computer, so as to display the distribution range and probability of the sampling points of the CANFD message arbitration segment and data segment on the host computer.

[0029] The CANFD bus sampling point detection method of this invention is as follows: Step 1: Simulate CANFD bus communication, simultaneously connect the test device and the device under test, ensuring normal communication, and perform sampling point testing on the device under test, such as... Figure 4 As shown; Step 2: Set the sending message sampling point, BTL, message period, and specific message ID. First, set BRS to 0 (dominant bit) through the message generation module. At this time, the transmission rate of the sampling points of the arbitration segment and the data segment is the same. Select the dominant bit in the CRC sequence "recessive-dominant-recessive" as the test bit and generate a CANFD test message. Step 3: Send the CANFD test message from the message generation module in Step 2 to the analog bus connected to the device under test, according to the number of interferences, the number of interference frames, and the interference interval. Step 4: Collect the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the analog bus after each frame is sent. The data recording module records the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 5: For the "recessive-dominant-recessive" CRC sequence in Step 2, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the overall frame length unchanged. The message generation module then regenerates the CANFD test message, such as... Figure 3 As shown; Step 6: Send the CANFD test message from the message generation module in Step 5 to the analog bus where the node under test is located, with the same number of interferences, number of interference frames, and interference interval. Step 7: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the arbitration segment sampling point. After the dominant bit length test ends, the dominant bit width is shortened by 1% and the test is repeated. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. The data recording module records the percentage of dominant bit length without an error frame as the ending position of the arbitration segment sampling point and ends the test. Step 8: Using the second calculation module and the interaction module, obtain the distribution map of the range and probability of the sampling points in the arbitration section of the device under test based on the test results; Step 9: According to the process in Step 2, set BRS to 1 (dominant bit). At this time, the data segment will switch baud rates. The transmission rate is inconsistent with that of the arbitration segment. The "recessive-dominant-recessive" CRC sequence is still selected to generate a CANFD test message. Step 10: Send the CANFD test message from the message generation module in Step 9 to the analog bus where the node under test is located, according to the number of interferences, number of interference frames, and interference interval. Step 11: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the analog bus after each frame is sent, and record the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 12: For the "recessive-dominant-recessive" CRC sequence in Step 9, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the length of the entire frame unchanged, and regenerate the CANFD test message. Step 13: Send the CANFD test message from the message generation module in Step 12 to the bus of the node under test with the same number of interferences, number of interference frames, and interference interval. The message acquisition module collects the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the data segment sampling point. After the dominant bit length test ends, shorten the dominant bit width by 1% and retest. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. Record the percentage of dominant bit length when there is no error frame as the ending position of the data segment sampling point and end the test. Step 14: Through the second calculation module and the interaction module, based on the test results, the distribution map of the range and probability of the sampling points of the data segment of the device under test can be obtained.

Claims

1. A CANFD bus sampling point detection device, comprising an interaction module, a calculation module, a data recording module, a message generation module, a message sending module, a message acquisition module, and a bit width stepping module, characterized in that: The calculation module includes a first calculation module and a second calculation module. The output of the message acquisition module is connected to the input of the data recording module. The output of the data recording module is connected to the inputs of the message generation module, the second calculation module, and the interaction module. The output of the second calculation module is connected to the input of the interaction module. The output of the interaction module is connected to the input of the first calculation module. The output of the first calculation module is connected to the input of the message generation module. The output of the message generation module is connected to the input of the message sending module. The output of the bit-width stepping module is connected to the inputs of the message generation module and the data recording module. The CANFD bus sampling point detection method is as follows: Step 1: Simulate CANFD bus communication, connect the test device and the device under test simultaneously, ensure normal communication, and perform sampling point testing on the device under test; Step 2: Set the sending message sampling point, BTL, message period, and specific message ID. First, set the dominant bit of BRS to 0 through the message generation module. At this time, the transmission rate of the sampling points of the arbitration segment and the data segment is the same. Select the dominant bit in the CRC sequence "recessive-dominant-recessive" as the test bit and generate a CANFD test message. Step 3: Send the CANFD test message from the message generation module in Step 2 to the analog bus connected to the device under test, according to the number of interferences, the number of interference frames, and the interference interval. Step 4: Collect the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the analog bus after each frame is sent. The data recording module records the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 5: For the "recessive-dominant-recessive" CRC sequence in Step 2, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the overall frame length unchanged, and the message generation module regenerates the CANFD test message. Step 6: Send the CANFD test message from the message generation module in Step 5 to the analog bus where the node under test is located, with the same number of interferences, number of interference frames, and interference interval. Step 7: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the arbitration segment sampling point. After the dominant bit length test ends, the dominant bit width is shortened by 1% and the test is repeated. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. The data recording module records the percentage of dominant bit length without an error frame as the ending position of the arbitration segment sampling point and ends the test. Step 8: Using the second calculation module and the interaction module, obtain the distribution map of the range and probability of the sampling points in the arbitration section of the device under test based on the test results; Step 9: According to the process in Step 2, set the dominant bit of BRS to 1. At this time, the data segment will switch baud rates and the transmission rate will be inconsistent with that of the arbitration segment. The "recessive-dominant-recessive" CRC sequence will still be selected to generate a CANFD test message. Step 10: Send the CANFD test message from the message generation module in Step 9 to the analog bus where the node under test is located, according to the number of interferences, number of interference frames, and interference interval. Step 11: The message acquisition module acquires the messages sent by the device under test on the bus. It needs to detect the active error flag on the analog bus after each frame is sent, and record the percentage of the dominant bit length and the number of error frames when a CRC error frame occurs. Step 12: For the "recessive-dominant-recessive" CRC sequence in Step 9, shorten the dominant bit by 1% and lengthen the next recessive bit by 1%, keeping the length of the entire frame unchanged, and regenerate the CANFD test message. Step 13: Send the CANFD test message from the message generation module in Step 12 to the bus of the node under test with the same number of interferences, number of interference frames, and interference interval. The message acquisition module collects the messages sent by the device under test on the bus. It is necessary to detect the active error flag on the bus after each frame is sent, record the percentage of dominant bit length when an error frame occurs and the number of error frames, and take the percentage of dominant bit length when an error frame first appears as the starting position of the data segment sampling point. After the dominant bit length test ends, shorten the dominant bit width by 1% and retest. As the dominant bit width gradually shortens, the error frame will change from having an error frame to having no error frame. Record the percentage of dominant bit length when there is no error frame as the ending position of the data segment sampling point and end the test. Step 14: Using the second calculation module and the interaction module, obtain the distribution map of the range and probability of the sampling points of the data segment of the device under test based on the test results.

2. The CANFD bus sampling point detection device according to claim 1, characterized in that: The first calculation module: In the CANFD message data frame, the CRC sequence is obtained by verifying the SOF, arbitration field, control field, data field, and stuff count using a specific CRC algorithm. After the BRS bit is determined, the content of the data field is changed to make the CRC sequence appear as a "recessive-dominant-recessive" sequence.

3. The CANFD bus sampling point detection device according to claim 1, characterized in that: The message generation module, based on the results from the first calculation module, selects the dominant bit in the sequence as the test bit according to the different BRS bits and the set message period, sampling point, and TQ number BTL Cycles information, and generates a CANFD test message with a specific ID.

4. The CANFD bus sampling point detection device according to claim 1, characterized in that: The message sending module sends the CANFD test message from the message generation module to the analog bus where the node under test is located, according to the number of interferences and the number of interference frames. There is a certain interval after each interference. During the interval, a normal message is sent to ensure that the device under test is in an active error state. When the bit width step reaches a certain position, the device under test has no error response, the test ends and no more CANFD test messages are sent.

5. A CANFD bus sampling point detection device according to claim 1, characterized in that: The bit width stepping module: according to the set step interval percentage, fine-tunes the length of the CRC dominant bit in the "recessive-dominant-recessive" sequence, so that the forward length is shortened successively, resulting in the length of the next recessive bit being increased successively, while ensuring that the length of the entire frame message remains unchanged.

6. The CANFD bus sampling point detection device according to claim 1, characterized in that: The aforementioned message acquisition module monitors the CANFD message status on the analog bus and receives response messages sent by the device under test.

7. The CANFD bus sampling point detection device according to claim 1, characterized in that: The data recording module is used to record the bit width position where the error response occurs and the corresponding number of error responses after each bit width step. After each CANFD message frame is sent to the analog bus, the device under test may issue an error response due to CRC error.

8. A CANFD bus sampling point detection device according to claim 1, characterized in that: The second calculation module obtains the proportion of errors under different dominant bit widths by recording the number of error responses by the data recording module. Combined with the starting position of the sampling point where the error frame occurs and the ending position of the sampling point where the error frame ends, it obtains the distribution map of the range and probability of the sampling points of the arbitration segment and data segment of the CANFD message of the device under test.

9. A CANFD bus sampling point detection device according to claim 1, characterized in that: The interactive module interacts with the host computer, generates corresponding CANFD test messages through the first calculation module and message generation module according to the parameters set by the host computer, and feeds back the second calculation module to the host computer, so as to display the distribution range and probability of the sampling points of the CANFD message arbitration segment and data segment on the host computer.

Citation Information

Patent Citations

  • Controller area network bus speeding-up method

    CN103973406A

  • Multichannel redundant CAN (Controller Area Network) bus test system with frame start sensitive synchronous trigger function

    CN104506376A