Fault waveform decomposition and fault location method for vehicle can bus
By recording and analyzing CAN bus waveforms, combining physical layer and data link layer protocols, adjusting lines and controllers, and decomposing waveforms to locate faults, the accuracy and efficiency problems of CAN bus fault diagnosis in existing technologies are solved, achieving rapid and reliable fault location and troubleshooting.
Patent Information
- Application Number
- CN202211703538.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-12-23
AI Technical Summary
Existing technologies struggle to quickly and accurately analyze and locate vehicle CAN bus faults, especially when the bus is unable to communicate and fault codes cannot be read. Furthermore, when waveform signals are converted to digital signals, application layer faults cannot be effectively identified.
Record the bus waveform with an oscilloscope to determine whether the CANH/CANL voltage range and period meet the characteristics of the CAN physical layer protocol. Adjust the line connection until it meets the protocol characteristics. Analyze the voltage range and period into digital signals. Remove or replace the controller to meet the data link layer protocol. Analyze the message to detect signal consistency. Decompose the waveform into DC and AC components, frequency and time axis to locate the fault.
It enables rapid and accurate identification of bus faults, effectively troubleshoots physical layer and application layer faults, and improves the reliability and efficiency of fault diagnosis.
Smart Images

Figure CN116016148B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle fault diagnosis technology, and in particular to a method for fault waveform decomposition and fault location for vehicle CAN bus. Background Technology
[0002] CAN bus technology, currently the most widely used automotive network technology, is a multi-master bus technology that uses differential voltage for communication. Different controllers in a CAN network are connected via twisted-pair cables, with two CAN lines: CANH and CANL. A fault in the CAN line can cause communication failure between different modules, severely impacting normal vehicle operation. Therefore, accurate analysis and troubleshooting of bus faults are essential. Common faults mainly include: controller hardware and software failures, vehicle wiring harness failures, and environmental interference. Currently, troubleshooting CAN bus faults often involves checking the correctness and integrity of the vehicle wiring harness connections or testing the controller's performance individually.
[0003] (1) Read the fault codes recorded inside the controller using diagnostic equipment.
[0004] Reading fault codes recorded inside the controller via diagnostic equipment is achieved by sending and reading data on the bus. Therefore, if the bus cannot communicate, the fault codes cannot be read. Recording fault codes requires the controller to have pre-set fault policies and fault judgment conditions. A corresponding fault code is generated when the conditions are met. Therefore, faults without policies or with incorrectly set fault conditions cannot be identified.
[0005] (2) Fault analysis is performed by recording waveforms with an oscilloscope.
[0006] By recording and analyzing waveforms with an oscilloscope, the changes in CANH and CANL voltages over time can be recorded and compared with the expected waveform, allowing for fault analysis. However, converting the waveform signal into a digital signal requires testers to analyze it byte by byte. For signals with normal voltage ranges, it is not possible to effectively troubleshoot application-level faults, such as whether the signal period or signal value is correct. Summary of the Invention
[0007] In view of the above, the present invention aims to provide a method for fault waveform decomposition and fault location of vehicle CAN bus, so as to solve the problem of troubleshooting bus faults by decomposing and analyzing the complex CAN waveforms of the whole vehicle or components.
[0008] The technical solution adopted in this invention is as follows:
[0009] This invention provides a method for fault waveform decomposition and fault location in a vehicle CAN bus, including:
[0010] Step S1: Record the bus waveform using an oscilloscope;
[0011] Step S2: Obtain the CANH / CANL voltage range and period of the bus waveform, and determine whether it meets the preset CAN physical layer protocol characteristics:
[0012] Step S3: For fault waveforms that do not meet the physical layer protocol characteristics, determine the cause of the fault and adjust the line connection accordingly. Repeat step S1 until the waveform meets the CAN physical layer protocol characteristics.
[0013] Step S4: For waveforms that meet the physical layer protocol characteristics, analyze their voltage range and period using a preset protocol and convert them into digital signals;
[0014] Step S5: If the digital signal does not meet the established data link layer protocol, replace or remove the corresponding controller on the bus until the controller causing the fault is identified, and restore the controller that has not experienced a fault.
[0015] Step S6: If the digital signal meets the established data link layer protocol, the signal consistency is detected by parsing the message.
[0016] In at least one possible implementation, the monitoring signal consistency includes: parsing the message ID and checking its consistency with a preset signal list.
[0017] In at least one of the possible implementations, if the signal list is inconsistent with the preset list, the redundant controller on the bus is removed and the missing controller is installed.
[0018] In at least one of the possible implementations, if the signal matches a preset list, the message content is parsed, faults are read from it, and reception errors are checked.
[0019] In at least one possible implementation, the error checking includes: determining whether the sampling point and the fault generation conditions are incorrect; if so, updating the configuration word or the corresponding software program; if not, ending the test.
[0020] In at least one possible implementation, decomposing and analyzing the bus waveform includes: decomposing the waveform into DC and AC components to locate physical layer faults.
[0021] In at least one of the possible implementations, the decomposition analysis further includes: performing frequency decomposition on the waveform to locate faults such as electromagnetic interference, reflected waves, higher harmonics, different protocols, or incorrect baud rate settings.
[0022] In at least one possible implementation, the decomposition analysis further includes: decomposing the waveform along its time axis to locate application-layer faults in the controller on the bus.
[0023] The main design concept of this invention lies in the rapid and accurate analysis of faults and their causes on the vehicle bus by reading waveforms. Specifically, the voltage range and period of different channels are obtained from the recorded bus waveforms, and it is determined whether they meet the characteristics of the CAN physical layer protocol. If not, the wiring connections are adjusted according to the cause of the fault until the waveform meets the characteristics of the CAN physical layer protocol. For waveforms that meet the physical layer protocol characteristics, their voltage range and period are parsed using a preset protocol and converted into digital signals. It is then determined whether the signal conforms to the data link layer protocol. If not, the corresponding controller on the bus is replaced or removed. When it conforms to the data link layer protocol, the message is parsed and signal consistency is checked. This invention can reliably identify bus faults and effectively troubleshoot faults at the bus application layer. Attached Figure Description
[0024] 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:
[0025] Figure 1 A flowchart illustrating a method for fault waveform decomposition and fault location in a vehicle CAN bus, provided as an embodiment of the present invention. Detailed Implementation
[0026] 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.
[0027] This invention proposes an embodiment of a fault waveform decomposition and fault location method for a vehicle CAN bus, specifically, as follows: Figure 1 As shown, it includes:
[0028] Step S1: Record the bus waveform using an oscilloscope;
[0029] Step S2: Obtain the CANH / CANL voltage range and period of the bus waveform, and determine whether it meets the preset CAN physical layer protocol characteristics.
[0030] Step S3: For fault waveforms that do not meet the physical layer protocol characteristics, determine the cause of the fault and adjust the line connection accordingly. Repeat step S1 until the waveform meets the CAN physical layer protocol characteristics.
[0031] Step S4: For waveforms that meet the physical layer protocol characteristics, analyze their voltage range and period using a preset protocol and convert them into digital signals;
[0032] Step S5: If the digital signal does not meet the established data link layer protocol, replace or remove the corresponding controller on the bus until the controller causing the fault is identified, and restore the controller that has not experienced a fault.
[0033] Step S6: If the digital signal meets the established data link layer protocol, the signal consistency is detected by parsing the message.
[0034] Furthermore, the consistency of the monitoring signals includes:
[0035] Parse the message ID and check its consistency with the preset signal list.
[0036] Based on this, if the signal list is inconsistent with the preset list, the redundant controllers on the bus are removed and the missing controllers are installed. Conversely, if the signal list is consistent with the preset list, the message content is parsed, faults are read from it, and reception errors are checked.
[0037] Furthermore, the error checking includes: determining whether the sampling point and fault generation conditions are incorrect; if so, updating the configuration word or the corresponding software program; if not, ending the test.
[0038] The decomposition analysis of the bus waveform includes: decomposing the waveform into DC and AC components to locate physical layer faults.
[0039] Or it may also include: performing frequency decomposition on the waveform to locate the following faults: electromagnetic interference, reflected waves, higher harmonics, different protocols, or incorrect baud rate settings.
[0040] Or it may also include: decomposing the time axis of the waveform to locate application layer faults in the controller on the bus.
[0041] Based on the above embodiments, the present invention provides the following illustrative description of the specific solutions involved:
[0042] Generally speaking, common bus faults can be categorized as follows:
[0043] I. Line faults, including:
[0044] 1) CANH / CANL short circuit to power or to ground;
[0045] 2) One of CANH / CANL is open-circuited;
[0046] 3) Some controllers have CANH / CANL reversed connections;
[0047] 4) The antigen is too high or too low.
[0048] II. Electromagnetic interference faults, including:
[0049] 1) Radiated interference;
[0050] 2) Conducted interference.
[0051] III. Controller hardware and software failures, including:
[0052] 1) Failure to send or receive message signals as expected;
[0053] 2) Incorrect sampling point;
[0054] 3) Baud rate error;
[0055] 4) Incorrect fault diagnosis strategy;
[0056] 5) Fault code settings and aging mechanism errors.
[0057] Waveform decomposition analysis strategy:
[0058] The CAN waveform acquired by the acquisition device consists of two waveforms: CANH and CANL. Under normal circumstances, the dominant bit voltage of CANH is approximately 3.5V, and the recessive bit voltage is 2.5V; the dominant bit voltage of CANL is 1.5V, and the recessive bit voltage is 2.5V. Fault-tolerant CAN signals are analyzed using differential voltage, typically 2V. The baud rate and sampling points on the same bus should be identical. Furthermore, an arbitration mechanism is in place for bus data transmission, allowing only a single controller to send a single message at a time.
[0059] Specifically, the following methods can be used to decompose the acquired waveform:
[0060] I. DC component and AC component.
[0061] A normal CAN waveform can be considered as a superposition of a 2V AC square wave signal and a 1.5V DC voltage signal. By comparing the amplitudes of the decomposed DC and AC signals with the standard amplitudes, various physical layer faults can be effectively identified. For example:
[0062] 1) CAN line short circuit to power or ground. A CANH / CANL short circuit to power or ground will manifest as a DC component of the same amplitude as the short circuit source superimposed on the CANH / L waveform. The shorted CAN line will not have a noticeable rising edge, but it will have little effect on the differential voltage value. If this fault occurs, check if the insulation of the wires is damaged, causing the short circuit. Specifically, if the shorted DC voltage source is less than 15V, CAN communication can still occur.
[0063] 2) Open circuit in either CANH or CANL. Under normal controller fault conditions, if a short circuit occurs in either CANH or CANL, due to the BUSOFF mechanism, the controller will send a recessive bit every TBUSOFF interval to attempt communication. During communication, the CAN line not short-circuited will either superimpose its waveform with the normally communicating controller's waveform or be sent separately. If superimposed, the amplitude will exceed the normal range; if sent separately, CANH / CANL will exhibit obvious one-sided transmission. Because the other line is open at this time, the differential voltage cannot be recognized, leading to transmission failure and entering an error mechanism, waiting for the TBUSOFF interval before attempting to transmit again. If the controller fault strategy is incorrect, continuous communication attempts will affect the normal transmission of other controllers, manifesting as continuous short pulses on the waveform.
[0064] 3) A single controller's CANH / CANL are reversed. This manifests as a periodic appearance of an AC component with an amplitude approximately twice the normal value (around 4V, which becomes 5.5V after adding the DC component). The period varies depending on the controller's faulty strategy. Other controllers can still send messages normally under these conditions. Furthermore, checking signal consistency can help locate the controller with the wiring fault.
[0065] II. Frequency Decomposition
[0066] Taking the infotainment CAN (hereinafter referred to as ICAN) of the Sihao QX as an example, the CAN baud rate is set to 500K. Any signal that does not meet this baud rate is a fault signal. Possible faults include:
[0067] 1) Electromagnetic interference, including radiated and conducted interference. There are many causes of electromagnetic interference, resulting in a variety of disturbances. The twisted-pair mechanism of the CAN bus can shield against some interference. In addition, it is necessary to check whether any electromagnetic devices have been installed in the vehicle, and to examine the possibility of interference in the environment.
[0068] 2) Reflected Waves. Impedance discontinuities on the transmission line can cause signal reflection. The reflected signal can interfere with the transmission of normal signals. From a waveform perspective, overshoot will occur near the signal transition edge, manifesting as voltage instability (potentially reaching twice the amplitude). Troubleshooting this fault involves checking if the bus termination resistor is set appropriately. A proper termination resistor (typically 120 ohms) can effectively absorb the energy of the reflected wave.
[0069] 3) Higher Harmonics. According to the principle of Fourier series, a square wave signal can be decomposed into a superposition of the fundamental wave and higher harmonics. If the inductive reactance design is unreasonable (e.g., the inductance is too large), it may hinder the propagation of higher harmonics, leading to a decrease in signal quality, manifested as glitches on the signal transition edges. This fault can be diagnosed by measuring the inductance and capacitance between the controller's CAN lines.
[0070] 4) Incompatible protocol or incorrect baud rate setting. Incorrect CAN protocol and incorrect baud rate setting can cause abnormal signal parsing, resulting in an abnormal signal period in the waveform. Checking the consistency of the parsed signal can help troubleshoot the faulty controller.
[0071] III. Waveform Horizontal Axis (Time Axis) Decomposition
[0072] According to the CAN bus arbitration mechanism, only one controller can transmit signals at a time. Waveform decomposition along the timeline can be used to check for faults in the controller's transmission strategy. Message data can be parsed using a preset protocol to check for application-layer faults in the controller. For example:
[0073] 1) Signal transmission consistency error. This includes errors in the transmitted signal ID, period, signal value, etc.
[0074] 2) Signal reception consistency error. If the controller sets the wrong sampling point, it may cause transmission errors; or if the controller expects to receive the wrong message ID, it will be unable to receive the required data.
[0075] 3) Fault code setting and aging mechanism errors. By reading diagnostic commands, it can be determined whether the controller generates and ages fault codes according to the correct fault code generation conditions and aging mechanism.
[0076] In summary, the main design concept of this invention lies in rapidly and accurately analyzing faults and their causes on the vehicle bus by reading waveforms. Specifically, the voltage range and period of different channels are obtained from the recorded bus waveforms, and it is determined whether they meet the characteristics of the CAN physical layer protocol. If not, the wiring connections are adjusted according to the cause of the fault until the waveform meets the characteristics of the CAN physical layer protocol. For waveforms that meet the physical layer protocol characteristics, their voltage range and period are parsed using a preset protocol and converted into digital signals. It is then determined whether the signal conforms to the data link layer protocol. If not, the corresponding controller on the bus is replaced or removed. When it conforms to the data link layer protocol, the message is parsed and signal consistency is checked. This invention can reliably identify bus faults and effectively troubleshoot faults at the bus application layer.
[0077] 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.
[0078] 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 method for fault waveform decomposition and fault location in a vehicle CAN bus, characterized in that, include: Step S1: Record the bus waveform using an oscilloscope; Step S2: Obtain the CANH / CANL voltage range and period of the bus waveform, and determine whether it meets the preset CAN physical layer protocol characteristics. Step S3: For fault waveforms that do not meet the physical layer protocol characteristics, determine the cause of the fault and adjust the line connection accordingly. Repeat step S1 until the waveform meets the CAN physical layer protocol characteristics. Specifically, this includes the following decomposition and analysis of each signal and differential voltage of the CAN bus twisted pair: (1) Decompose the waveform into DC and AC components to locate physical layer faults; (2) Decompose the waveform by frequency to locate the following faults: electromagnetic interference, reflected waves, high-order harmonics, different protocols or incorrect baud rate settings; (3) Decompose the time axis of the waveform to locate the application layer fault of the controller on the bus; Step S4: For waveforms that meet the physical layer protocol characteristics, analyze their voltage range and period using a preset protocol and convert them into digital signals; Step S5: If the digital signal does not meet the established data link layer protocol, replace or remove the corresponding controller on the bus until the controller causing the fault is identified, and restore the controller that has not experienced a fault. Step S6: If the digital signal meets the established data link layer protocol, the signal consistency is detected by parsing the message.
2. The method for fault waveform decomposition and fault location of a vehicle CAN bus according to claim 1, characterized in that, The detection signal consistency includes: parsing the message ID and checking its consistency with a preset signal list.
3. The method for fault waveform decomposition and fault location of a vehicle CAN bus according to claim 2, characterized in that, If the signal list is inconsistent with the preset list, remove the redundant controllers on the bus and install the missing controllers.
4. The method for fault waveform decomposition and fault location of a vehicle CAN bus according to claim 2, characterized in that, If it matches the preset signal list, the message content is parsed, the fault is read from it, and the reception error is checked.
5. The method for fault waveform decomposition and fault location of a vehicle CAN bus according to claim 4, characterized in that, The error checking process includes: determining whether the sampling point and fault generation conditions are incorrect; if so, updating the configuration word or the corresponding software program; if not, ending the test.
Citation Information
Patent Citations
System and Method for using Signal Waveform Analysis for Detecting a Change in a Wired Network
US20190385057A1