Fault detection method, circuit, device, equipment and storage medium
By performing full-link detection in the autonomous driving domain controller, the problem of rapid and accurate CAN bus fault detection in autonomous vehicles is solved, automatic fault location is realized, and driving safety is improved.
Patent Information
- Application Number
- CN202410620123.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-09-03
AI Technical Summary
CAN bus fault detection in autonomous vehicles is difficult to achieve quickly, accurately and automatically, affecting driving safety.
Provide a fault detection method and circuit, by setting the central processor, microcontroller and CAN transceiver in the automatic driving domain controller to perform full-link detection, including initial detection, CAN bus data detection, microcontroller error detection, CAN ID verification and wiring status detection, output the fault results of the preset fault concentration.
It achieves rapid location of specific faults, improves the efficiency and convenience of fault location, supports automated testing without the need for external equipment and on-site operations, and enhances driving safety.
Smart Images

Figure CN118584935A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to the field of autonomous driving technology. Background Art
[0002] In autonomous driving vehicles, the data link used to control the vehicle is particularly important and directly related to driving safety. Therefore, effective fault detection of the controller area network (CAN) bus of the data link is an indispensable part of the autonomous driving scenario. Summary of the invention
[0003] The present disclosure provides a fault detection method, circuit, device, equipment and storage medium.
[0004] According to one aspect of the present disclosure, there is provided a fault detection method, comprising:
[0005] When the CAN fault detection process is triggered, a CAN bus fault detection is performed on the autonomous driving domain controller; wherein the autonomous driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus;
[0006] Output fault results;
[0007] Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
[0008] According to another aspect of the present disclosure, there is provided a fault detection device, comprising:
[0009] A fault detection unit, configured to perform CAN bus fault detection on the autonomous driving domain controller when the CAN fault detection process is triggered; wherein the autonomous driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus;
[0010] Output unit, used to output fault results;
[0011] Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
[0012] According to another aspect of the present disclosure, there is provided a fault detection circuit for an autonomous driving domain controller, wherein the autonomous driving domain controller is provided with at least a central controller, a microcontroller, and a CAN transceiver connected via a CAN bus;
[0013] The fault detection circuit is connected to the central controller, the microcontroller, and the CAN transceiver provided in the autonomous driving domain controller to perform a CAN fault detection process and obtain a fault type result;
[0014] Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
[0015] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0019] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0020] According to yet another aspect of the present disclosure, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the computer program implements any method according to the embodiments of the present disclosure.
[0021] In this way, the disclosed solution fully combines the characteristics of autonomous driving vehicles and proposes a full-link detection method that can quickly locate specific faults with strong versatility. Moreover, the disclosed solution does not rely on external equipment and does not require on-site operation to realize the detection process of automated testing, thereby effectively improving the efficiency and convenience of fault location.
[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0024] Figure 1 This is a schematic flow chart of a fault detection method according to an embodiment of the present application. Figure 1 ;
[0025] FIG2( a ) is a schematic diagram of the structure of the automatic driving controller 10 in an example;
[0026] FIG2( b ) is a schematic flow chart of a fault detection method according to another embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of the entire process of fault inspection in a specific scenario according to an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of a fault detection circuit for an autonomous driving domain controller according to the disclosed solution;
[0029] FIG5( a ) is a schematic diagram of the structure of a fault detection circuit in an example according to an embodiment of the present application;
[0030] FIG5( b ) is a schematic diagram of a CAN ID verification process in a specific scenario according to an embodiment of the present application;
[0031] FIG5( c ) is a schematic diagram of a detection process of a CAN connection status in a specific scenario according to an embodiment of the present application;
[0032] FIG5( d ) is a schematic diagram of a detection process of a terminal matching resistor on a CAN bus in a specific scenario according to an embodiment of the present application;
[0033] FIG5( e ) is a schematic diagram of a signal transmission process corresponding to a terminal matching resistor on a CAN bus in a specific scenario according to an embodiment of the present application;
[0034] Figure 6 is a structural schematic diagram of a fault detection device according to an embodiment of the present application;
[0035] Figure 7 is a block diagram of an electronic device used to implement the fault detection method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0037] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The term "at least one" in this article means any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. The terms "first" and "second" in this article refer to multiple similar technical terms and distinguish them. They do not mean to limit the order or to limit them to only two. For example, the first feature and the second feature refer to two types / two features. The first feature can be one or more, and the second feature can also be one or more.
[0038] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the specific embodiments below. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0039] The following is a description of the related technologies of the embodiments of the present disclosure. The following related technologies are optional solutions that can be arbitrarily combined with the technical solutions of the embodiments of the present disclosure, and they all belong to the protection scope of the embodiments of the present disclosure.
[0040] In autonomous vehicles, the data link used to control the vehicle is particularly important and directly related to driving safety. Therefore, effective fault detection of the CAN bus of this data link is an indispensable part of the autonomous driving scenario.
[0041] Based on this, the disclosed solution provides a fault detection circuit and fault detection method for the CAN bus in an autonomous driving vehicle. Moreover, it fully combines the characteristics of the autonomous driving vehicle and realizes full-link detection, so that CAN problems can be quickly located.
[0042] Figure 1 This is a schematic flow chart of a fault detection method according to an embodiment of the present application. Figure 1The method may be optionally applied to electronic devices, such as autonomous driving domain controllers, vehicle-mounted controllers, or CAN diagnostic instruments.
[0043] Further, the method includes at least part of the following contents. Figure 1 As shown, including:
[0044] Step S01: When the CAN fault detection process is triggered, a CAN bus fault detection is performed on the autonomous driving domain controller.
[0045] Here, the automatic driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus.
[0046] Step S02: Output the fault category results.
[0047] Here, the fault type result is one of the faults in the preset fault set.
[0048] Furthermore, the faults in the preset fault set include two of the following:
[0049] Application layer software control errors;
[0050] CAN transceiver class error;
[0051] Preset class errors corresponding to the microcontroller;
[0052] CAN bus transmission line error;
[0053] The terminal resistance in the CAN bus is abnormal.
[0054] The peer device of the autonomous driving domain controller has no data to send.
[0055] In this way, the disclosed solution fully combines the characteristics of autonomous driving vehicles and proposes a full-link detection method that can quickly locate specific faults with strong versatility. Moreover, the disclosed solution does not rely on external equipment and does not require on-site operation to realize the detection process of automated testing, thereby effectively improving the efficiency and convenience of fault location.
[0056] In a specific example, FIG2(a) is a schematic diagram of the structure of the automatic driving controller 10 in an example. As shown in FIG2(a), the automatic driving controller 10 includes at least a central controller 101, a microcontroller 100, a CAN transceiver 106, a terminal matching resistor 107, and a CAN connector 108, and the central controller 101, the microcontroller 100, the CAN transceiver 106, the terminal matching resistor 107, and the CAN connector 108 are sequentially connected through a CAN bus, so that the automatic driving controller 10 can perform automatic driving algorithm judgment based on the received vehicle data, and control the vehicle driving through the wire controller 20, such as acceleration, deceleration, or turning. Here, in an example, the CAN connector 108 is connected to the wire controller 20 through a twisted pair.
[0057] Here, in one example, the central controller 101 is used to execute the autonomous driving algorithm, whether the CAN bus vehicle control fails, etc., such as determining whether the response signal of the wire control controller 20 received in the autonomous driving planning control algorithm (such as the Planning and Control (PnC) algorithm) has timed out, or whether the control quantity of the response signal (the control quantity includes the steering angle and the vehicle speed) deviates from the actual quantity by more than a preset range.
[0058] Furthermore, in one example, the microcontroller 100 is used to send and receive CAN messages, perform monitoring, etc.; for example, it communicates with the central controller 101 via Ethernet to forward CAN messages; the microcontroller 100 may also be provided with a CAN controller, an analog-to-digital converter (ADC) module, and an input / output module (referred to as an IO module).
[0059] Furthermore, in one example, the CAN transceiver 106 is a standard CAN transceiver, which can be used to implement the conversion of CAN messages from the data link layer to the physical layer signal.
[0060] Furthermore, in a specific example, as shown in FIG2( b ), before step S01, the method further includes:
[0061] Step S11: When the vehicle control identification is confirmed, a warning message is issued;
[0062] For example, when the automatic driving controller 10 determines that the vehicle control fails, an alarm message (e.g., fault information, etc.) is sent through the alarm module 30. For example, in one example, the alarm module 30 may be provided with a display screen to prompt the fault information in real time; further, the alarm module 30 may also be provided with a wireless communication unit, such as a 4G or 5G module, to transmit the alarm information to the automatic driving cloud platform in real time.
[0063] Step S12: The redundant system or manual takeover of the vehicle.
[0064] For example, after receiving the alarm information, the cloud monitoring platform 40 triggers the redundant system to take over the vehicle, or prompts manual takeover of the vehicle.
[0065] Here, in one example, the cloud monitoring platform 40 may be specifically an autonomous driving cloud platform, which can monitor the operating status of the unmanned vehicle in real time, and issue instructions such as remote takeover or redundant system takeover when necessary.
[0066] Step S13: triggering the CAN fault detection process.
[0067] For example, redundant systems or manually triggered CAN fault detection processes.
[0068] In this way, when fault detection is needed, the fault detection process is automatically triggered, thereby further improving the level of automated detection of autonomous driving vehicles.
[0069] In a specific example of the disclosed solution, the above-mentioned CAN bus fault detection of the autonomous driving domain controller includes at least one of the following:
[0070] Detection 1: Execute an initial detection process to detect the data transmitted from the microcontroller to the central controller.
[0071] Detection 2: Execute the data detection process of the CAN bus to verify the buffered data of the CAN controller in the microcontroller.
[0072] Detection three: Execute the detection process of other types of microcontroller errors to query the CAN error register value of the CAN controller in the microcontroller.
[0073] Test 4: Execute the CAN identification (ID) verification process to verify the accuracy of the CAN ID;
[0074] Test 5: Execute the CAN wiring status detection process to detect the wiring status of the CAN bus.
[0075] It should be noted that, in actual applications, the CAN bus fault detection described above can specifically execute any of the detection processes described above, or execute any two or more of the detection processes described above, or execute the detection processes described above until the fault is located, etc. The present disclosure does not impose specific restrictions on the order of execution and the specific detection content selected.
[0076] In this way, the disclosed solution provides a specific detection solution, and the above detection solution is simple and efficient. Moreover, the above detection solution fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications. At the same time, it also further improves the efficiency and convenience of fault location.
[0077] Further, in a specific example, the initial detection process may be performed in the following manner, that is, for detection one, the above-mentioned execution of the initial detection process to detect the data transmitted from the microcontroller to the central controller may specifically include:
[0078] A first control instruction is generated based on the data detection result (ie, the detection result of the data transmitted by the microcontroller to the central controller).
[0079] Here, the first control instruction is used to indicate an output application layer software error, or to indicate the execution of a data detection process of the CAN bus (ie, to indicate the execution of the second detection described above).
[0080] Here, in an example, the above-mentioned generating the first control instruction based on the data detection result may specifically include:
[0081] When it is determined based on the data detection result that the data transmitted from the microcontroller to the central controller meets the transmission requirement (in this case, the transmitted data can be considered normal), a first control instruction for indicating an output application layer software error is generated;
[0082] or,
[0083] When it is determined based on the data detection result that the data transmitted by the microcontroller to the central controller does not meet the transmission requirements (at this time, the transmitted data can be considered abnormal), a first control instruction is generated to instruct the execution of the data detection process of the CAN bus (that is, a control instruction is generated to instruct the execution of the second detection described above).
[0084] For instance, in one example, the delay and / or frame frequency of the data transmitted from the microcontroller to the central controller can be detected to see whether it is normal. If it is normal, the current fault is considered to be an application layer software error. If it is abnormal, further detection can be performed, such as executing the second detection described above.
[0085] In this way, the disclosed scheme provides a detailed scheme for the initial detection process, which can effectively detect faults in the upper-level control software. Moreover, the detailed scheme fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0086] Further, in a specific example, the data detection process of the CAN bus can be executed in the following manner, that is, for detection 2, the above-mentioned execution of the data detection process of the CAN bus to verify the buffered data of the CAN controller in the microcontroller can specifically include:
[0087] A second control instruction is generated based on the verification result (ie, the verification result of the buffer data of the CAN controller).
[0088] Here, the second control instruction is used to instruct the output of a microcontroller forwarding error, or to instruct the execution of a detection process for other microcontroller errors (ie, to instruct the execution of the above-mentioned detection three).
[0089] Here, in an example, the above-mentioned generating the second control instruction based on the verification result may specifically include:
[0090] In the case where it is determined based on the verification result that the buffered data of the CAN controller meets the verification requirement (that is, it is considered that the data state of the CAN bus is normal), a second control instruction for indicating a forwarding error of the output microcontroller is generated;
[0091] or,
[0092] When it is determined based on the verification result that the buffered data of the CAN controller does not meet the verification requirements (that is, the data state of the CAN bus is considered abnormal), a second control instruction is generated to instruct the execution of the microcontroller's other type of error detection process (that is, a control instruction is generated to instruct the execution of the above-mentioned detection three).
[0093] For instance, in one example, the CAN message format and content can be verified based on the buffered data of the CAN controller, and then whether the data status of the CAN bus is normal can be determined based on the verification result. For example, if the CAN message format and content are correct, the data status of the CAN bus can be considered normal; otherwise, the data status of the CAN bus is considered abnormal.
[0094] In this way, the disclosed scheme provides a detailed scheme for the CAN bus data detection process, which can effectively detect microcontroller forwarding errors. Moreover, the detailed scheme fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0095] Further, in a specific example, the following method may be used to execute the detection process of other types of errors of the microcontroller. That is, for detection three, the above-mentioned detection process of executing other types of errors of the microcontroller to query the CAN error register value of the CAN controller in the microcontroller may specifically include:
[0096] A third control instruction is generated based on the CAN error register value.
[0097] Here, the third control instruction is used to instruct the output of a preset second type error corresponding to the microcontroller, or to instruct the execution of a CAN ID verification process (ie, to instruct the execution of the above-mentioned detection four).
[0098] Here, in an example, the above-mentioned generation of the third control instruction based on the CAN error register value may specifically include:
[0099] In a case where it is determined based on the CAN error register value that there is no preset first type error, generating a third control instruction instructing to output a preset second type error;
[0100] or,
[0101] When it is determined based on the CAN error register value that there is a preset first type error, a third control instruction for instructing execution of the CAN ID verification process is generated (ie, a control instruction for instructing execution of the above-mentioned detection four is generated).
[0102] For example, in one example, there is a mapping relationship between the CAN error register value and the error classification. At this time, the error classification corresponding to the current CAN error register value can be determined directly based on the mapping relationship between the CAN error register value and the error classification.
[0103] Further, in one example, the preset first type of error includes but is not limited to at least one of the following: BusOFF occurs; no error is found in the register query, but the buffer data is empty.
[0104] Further, in another example, the preset second type of error includes but is not limited to at least one of the following: buffer full; response error; bit stuffing error; format error; bit error; CRC error.
[0105] Here, it should be noted that, in actual applications, the preset second type of error may include all errors that can be output by the CAN controller, and the disclosed solution does not limit this.
[0106] In this way, the disclosed solution provides a detailed solution for the detection process of other types of microcontroller errors, which can output the error type that matches the CAN error register value, thereby improving the efficiency and convenience of fault location. Moreover, the detailed solution fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications.
[0107] Further, in a specific example, the CAN ID verification process can be performed in the following manner, that is, for detection 4, the above-mentioned execution of the CAN ID verification process to verify the accuracy of the CAN ID can specifically include:
[0108] A fourth control instruction is generated based on the accuracy result (ie, the result after verifying the CAN ID).
[0109] Here, the fourth control instruction is used to instruct the output of a CAN transceiver type error, or to instruct the execution of a detection process of the CAN wiring status (that is, to instruct the execution of the detection five described above).
[0110] Here, in an example, the generating of the fourth control instruction based on the accuracy result described above may specifically include:
[0111] If it is determined based on the accuracy result that the CAN ID is accurate, generating a fourth control instruction indicating an output CAN transceiver class error;
[0112] or,
[0113] When it is determined based on the accuracy result that the CAN ID is inaccurate, a fourth control instruction is generated to instruct execution of a detection process for the CAN wiring status (ie, a control instruction to execute the detection five described above is generated).
[0114] In this way, the disclosed scheme provides a detailed scheme for the verification process of CAN ID, which can effectively detect CAN transceiver errors. Moreover, the detailed scheme fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0115] For example, Figure 3 FIG. 1 is a schematic diagram of the entire process of fault inspection in a specific scenario according to an embodiment of the present application. The scenario combines the multiple detection methods described above to implement a full-process detection. Specifically, Figure 3 As shown, the fault detection method specifically includes:
[0116] Step S131: Execute detection one, for example, detect the data transmitted from the microcontroller 100 to the central controller 101 (the data is the data of the data link layer, which is a digital signal).
[0117] For example, the transmission delay and / or frame frequency of the data is detected.
[0118] Here, network transmission is used to send data between the microcontroller 100 and the central controller 101. At this time, the Ethernet characteristics can be run to obtain the transmission delay. For example, the timestamps of the data in the network card of the microcontroller 100 and the network card of the central controller 101 are subtracted, and the difference is the transmission delay.
[0119] Furthermore, in one example, if the difference is less than a preset value (eg, 20 ms), it may be considered normal.
[0120] Step S132: Determine whether the transmission delay and frame frequency are normal; if so, execute step S133; otherwise, execute step S134.
[0121] Step S133: Output upper layer control software fault (corresponding to the application layer software error mentioned above).
[0122] Step S134: Execute detection 2, for example, using the built-in CAN controller of the microcontroller 100 to detect the data status of the CAN bus to verify the buffer data of the CAN controller.
[0123] For instance, in one example, the CAN message format and content can be verified based on the buffered data of the CAN controller, and then whether the data status of the CAN bus is normal can be determined based on the verification result. For example, if the CAN message format and content are correct, the data status of the CAN bus can be considered normal; otherwise, the data status of the CAN bus is considered abnormal.
[0124] Step S135: Determine whether the bus data status is normal; if so, execute step S136; otherwise, execute step S137.
[0125] Step S136: Output microcontroller forwarding error.
[0126] Step S137: Execute detection three, for example, query the CAN error register value of the CAN controller.
[0127] Step S138: Determine whether there is a Type I error (corresponding to the preset Type I error described above) based on the CAN error register value; if so, execute step S140; otherwise, that is, there is no Type I error, execute step S139.
[0128] Step S139: Output the type of Type II error (corresponding to the preset Type II error described above).
[0129] That is, in this example, the error classification can be output based on the CAN error register value. Here, in one example, the type I error includes but is not limited to at least one of the following: Bus OFF occurs; the register does not find an error, but the buffer data is empty.
[0130] Further, in another example, Type II errors include but are not limited to at least one of the following: buffer full; response error; bit stuffing error; format error; bit error; CRC error, etc., all errors that can be output by the CAN controller.
[0131] Step S140: Execute detection four, that is, start the CAN ID verification process (the specific process can be found in the following steps).
[0132] Step S141: Determine whether the CAN ID is normal; if so, execute step S142; otherwise, execute step S143;
[0133] Step S142: Output CAN transceiver type error.
[0134] Step S143: Execute detection five, that is, start the detection process of the CAN wiring status.
[0135] Step S144: Outputting the final detection result based on the detection result of the CAN wiring status.
[0136] In a specific example of the disclosed solution, the CAN ID may also be verified in the following manner. Specifically, the CAN ID verification process described above may specifically include:
[0137] Based on the CAN differential signal of the CAN bus, determine the control segment arbitration ID of the CAN message;
[0138] Based on the arbitration ID of the control segment of the CAN message, the current CAN ID is verified.
[0139] Further, in a specific example, the above-mentioned determination of the control segment arbitration ID of the CAN message based on the CAN differential signal of the CAN bus may specifically include:
[0140] Convert the CAN differential signal of the CAN bus into a single-ended signal;
[0141] attenuating the single-ended signal into a first signal that meets input requirements;
[0142] The first signal is input to the microcontroller to obtain the control segment arbitration ID of the CAN message.
[0143] Here, in a specific example, in order to achieve the above-mentioned detection, the disclosed solution also provides a fault detection circuit for an autonomous driving domain controller, wherein, Figure 4 As shown, the fault detection circuit is connected to the autonomous driving domain controller, such as the central controller, microcontroller and CAN transceiver provided in the autonomous driving domain controller, to perform the CAN fault detection process and obtain the fault type results described above.
[0144] In this way, the above-mentioned inspection can be achieved by using the fault detection circuit. Moreover, the circuit structure is simple and easy to implement in engineering, which further provides support for large-scale engineering applications. At the same time, it also further provides support for improving the efficiency and convenience of fault location.
[0145] Furthermore, in one example, the fault detection circuit is built into the autonomous driving domain controller. Based on this, when the CAN fault detection process is started, the fault detection circuit can be called to achieve fault location.
[0146] For example, in one example, as shown in FIG5(a), the fault detection circuit includes an attenuation circuit 102 and a differential-to-single-ended circuit 103, wherein the attenuation circuit 102 is electrically connected to the microcontroller 100, and the differential-to-single-ended circuit 103 is electrically connected to the attenuation circuit 102, the CAN transceiver, and the CAN connector, respectively. Based on this, the differential-to-single-ended circuit 103 in the fault detection circuit can be used to convert the CAN differential signal of the CAN bus into a single-ended signal, and the attenuation circuit 102 in the fault detection circuit can be used to attenuate the single-ended signal obtained above into a first signal that meets the input requirements.
[0147] In this way, the disclosed solution further provides a process for determining the control segment arbitration ID in the CAN ID verification process, so as to effectively detect CAN transceiver errors. Moreover, the determination process fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0148] For example, FIG. 5( b) is a schematic diagram of a CAN ID verification process in a specific scenario according to an embodiment of the present application. As shown in FIG. 5( b ), the CAN ID verification process (for example, step S140 described above) may specifically include:
[0149] Step S1401: the differential-to-single-ended circuit 103 converts the CAN differential signal of the CAN bus into a single-ended signal.
[0150] Step S1402: the attenuation circuit 102 attenuates the single-ended signal obtained in the previous step into a signal suitable for the input range of an IO module (eg, a single-chip IO module built into the microcontroller 100) to obtain a first signal.
[0151] Here, in this example, the attenuation circuit 102 has the following functions: first, to attenuate the signal amplitude so that the voltage range of the obtained signal (such as the first signal) is within the detection range of the microcontroller (for example, the detection range is 0-3.3v); second, to limit the signal bandwidth to remove high-frequency noise on the CAN bus, for example, high-pass filtering is performed to filter out signals above the F frequency (the typical value of the F frequency is 100MHz or 200MHz).
[0152] Step S1403: Input the first signal to the microcontroller to trigger an external input interrupt. Here, after the first signal is input to the microcontroller, both the rising edge and the falling edge of the first signal will trigger the external input interrupt of the microcontroller.
[0153] Step S1404: The microcontroller counts the time between two adjacent interruptions, and determines the control segment arbitration ID of the CAN message according to the time interval. For example, the microcontroller counts the time between two adjacent interruptions, and finally determines the control segment arbitration ID of the CAN message based on the detected signal type (rising edge or falling edge).
[0154] Step S1405: parse the control segment arbitration ID obtained in the previous step according to the CAN protocol to obtain the currently received CAN ID, compare the currently received CAN ID with the expected CAN ID, and if they cannot match, output CAN ID detection abnormality. Otherwise, output CAN ID detection normal.
[0155] Further, in a specific example, the detection process of the CAN wiring state can be performed in the following manner, that is, for detection five, the above-mentioned detection process of executing the CAN wiring state to detect the wiring state of the CAN bus includes at least one of the following:
[0156] Detect the voltage status of the CAN bus;
[0157] Check whether there is data on the CAN bus;
[0158] Check the terminal matching resistance on the CAN bus.
[0159] Here, the terminal matching resistor is located between the high voltage signal and the low voltage signal of the CAN differential signal on the CAN bus. For example, as shown in FIG5(a), the terminal matching resistor 107 is located between the CAN transceiver 106 and the CAN connector 108 in the autonomous driving domain controller to ensure stable and accurate signal transmission to improve the reliability and stability of the communication system. Specifically, the functions of the terminal matching resistor on the CAN bus mainly include the following points:
[0160] First, eliminate signal reflection: When the signal is transmitted from the transmitter to the receiver, the terminal resistor can eliminate the interference caused by signal reflection and ensure the integrity and accuracy of the signal.
[0161] Second, improve signal quality: The terminal matching resistor has an important impact on the transmission quality of the signal. When the signal is transmitted at the transmitting end, the capacitance and inductance on the CAN bus will cause the shape and amplitude of the signal to change. The terminal matching resistor provides the correct loading impedance at the receiving end, which can effectively compensate for this change, so that the receiving end can accurately restore the original shape and amplitude of the signal.
[0162] Third, improve the reliability and stability of the communication system: The terminal matching resistor can effectively reduce the impact of noise and interference and improve the reliability of the communication system. In the absence of terminal matching resistors, the reflection of the signal may be mistaken for a valid signal, resulting in communication errors and data loss. The presence of terminal matching resistors can reduce the possibility of such misjudgment and improve the stability and reliability of the communication system.
[0163] Fourth, ensure matching: The impedance value of the terminal resistor is usually matched with the characteristic impedance of the bus transmission line. This ensures that the signal on the transmission line matches the impedance of the source end, minimizing reflection and signal attenuation on the transmission line. Too high or too low resistance may affect the normal transmission of the signal.
[0164] In this way, the disclosed solution provides a specific detection dimension for the wiring status of the CAN bus. This detection dimension fully combines the characteristics of autonomous driving vehicles, has strong interpretability, provides support for large-scale engineering applications, and further improves the efficiency and convenience of fault location.
[0165] Here, in an example, the above-mentioned detection of the voltage state of the CAN bus may specifically include:
[0166] Collect and obtain the voltage status of the CAN bus;
[0167] A fifth control instruction is generated based on the voltage state; wherein the fifth control instruction is used to indicate an abnormal transmission line fault that matches the output voltage state, or to indicate a detection of whether there is data on the CAN bus.
[0168] Here, in an example, the above-mentioned generating the fifth control instruction based on the voltage state may specifically include:
[0169] When it is determined based on the voltage state of the CAN bus that the silent voltage state does not meet the voltage requirement, a fifth control instruction is generated for indicating an abnormal transmission line fault matching the output voltage state;
[0170] or,
[0171] When it is determined based on the voltage state of the CAN bus that the silent voltage state meets the voltage requirement, a fifth control instruction is generated to instruct to detect whether there is data on the CAN bus.
[0172] It should be noted that, in this example, the abnormal transmission line fault matching the voltage state can be specifically one of the following: CAN high voltage signal (CAN-H) is short-circuited with the power supply, CAN-H is short-circuited with the ground, CAN low voltage signal (CAN-L) is short-circuited with the power supply, CAN-L is short-circuited with the ground, and CAN-H is short-circuited with the CAN-L.
[0173] In this way, the disclosed solution provides a detailed solution for detecting the voltage state of the CAN bus, which can effectively detect abnormal transmission line faults. Moreover, the detailed solution fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0174] Further, in an example, the voltage state of the CAN bus may be acquired in the following manner. Specifically, the above-mentioned acquisition of the voltage state of the CAN bus may specifically include:
[0175] Adjusting a high voltage signal (CAN-H) of a CAN differential signal of a CAN bus into a second signal;
[0176] Adjusting the low voltage signal (CAN-L) of the CAN differential signal of the CAN bus into a third signal;
[0177] The second signal and the third signal are input to the microcontroller to acquire the voltage state of the CAN bus.
[0178] For example, in one example, as shown in FIG5(a), the first signal conditioning circuit 104 in the fault detection circuit can be used to adjust the high voltage signal (CAN-H) of the CAN differential signal of the CAN bus into a second signal, and the low voltage signal (CAN-L) of the CAN differential signal can be adjusted into a third signal using the second signal conditioning circuit 109. The second signal and the third signal are input to the microcontroller 100, and the voltage state on the CAN bus is acquired using the built-in ADC module of the microcontroller 100.
[0179] Here, in one example, the first signal conditioning circuit 104 and the second signal conditioning circuit 109 may both have functions such as voltage limiting protection, voltage division, and low-pass filtering, so as to remove noise and make the processed signal suitable for acquisition by the ADC module, thereby playing the role of signal attenuation and protecting the subsequent chip.
[0180] In this way, the disclosed solution provides a specific solution for acquiring the voltage state of the CAN bus. The solution is simple, efficient, and can quickly acquire the voltage state, thereby providing strong support for subsequent rapid fault location.
[0181] Here, in an example, the detection of whether there is data on the CAN bus may specifically include:
[0182] A sixth control instruction is generated based on the data existence result (ie, the result of whether data exists on the CAN bus), wherein the sixth control instruction is used to indicate an output CAN transceiver type error, or to indicate detection of a terminal resistance on the CAN bus.
[0183] Furthermore, the above-mentioned generating the sixth control instruction based on the data existence result may specifically include:
[0184] In a case where it is determined based on the data existence result that data exists on the CAN bus, generating a sixth control instruction for indicating an output CAN transceiver type error;
[0185] or,
[0186] When it is determined based on the data existence result that no data exists on the CAN bus, a sixth control instruction for instructing detection of a terminal resistance on the CAN bus is generated.
[0187] In this way, the disclosed solution provides a solution for checking whether there is data on the CAN bus, which can effectively detect CAN transceiver errors. Moreover, the solution fully combines the characteristics of autonomous driving vehicles, has strong interpretability, and provides support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0188] Here, in an example, the above-mentioned detection of the terminal matching resistance on the CAN bus may specifically include:
[0189] Detect and obtain the resistance value of the terminal matching resistor on the CAN bus;
[0190] A seventh control instruction is generated based on the resistance value of the terminal matching resistor, wherein the seventh control instruction is used to indicate an output terminal matching resistor abnormality error, or an output peer device no data sent error.
[0191] Furthermore, the above-mentioned generation of the seventh control instruction based on the resistance value of the terminal matching resistor may specifically include:
[0192] When the resistance value of the terminal matching resistor is normal, a control instruction indicating that the output peer device has no data and issues a type of error is generated;
[0193] or,
[0194] When the resistance value of the terminal matching resistor is abnormal, a control instruction indicating an abnormal error of the output terminal matching resistor is generated;
[0195] In this way, the disclosed scheme provides a specific scheme for detecting the terminal matching resistance on the CAN bus, which can effectively check the abnormal terminal matching resistance errors and the errors such as no data sent by the terminal device. Moreover, the scheme fully combines the characteristics of autonomous driving vehicles and has strong interpretability, providing support for large-scale engineering applications, thereby further improving the efficiency and convenience of fault location.
[0196] For example, FIG. 5( c ) is a schematic diagram of a detection process of a CAN connection status in a specific scenario of the disclosed solution. As shown in FIG. 5( c ), the CAN connection status inspection process (for example, step S143 described above) may specifically include:
[0197] Step S1431: The CAN-H of the CAN differential signal on the CAN bus is processed by the first signal conditioning circuit 104 to obtain a second signal, and the CAN-L of the CAN differential signal is processed by the second signal conditioning circuit 109 to obtain a third signal.
[0198] Step S1432: the second signal and the third signal are input into the built-in ADC module of the microcontroller 100, so as to acquire the voltage state on the CAN bus by using the ADC module.
[0199] Step S1433: Based on the voltage status on the CAN bus, determine whether the voltage status of the CAN bus is in the silent area; if so, execute step S1434; otherwise, execute step S1435.
[0200] For example, in one example, the voltage values within a preset time (such as 1 ms) are continuously collected, and the area where the voltage value variation range is less than the preset voltage (50 mV) can be regarded as a silent area.
[0201] Step S1434: Determine whether there is no data on the CAN bus; if so, execute step S1437, otherwise, execute step S1436.
[0202] For example, if the voltage of a single end to ground on the CAN bus is always within a preset range, such as 2.5V±0.5V, and the variation range is less than 50mV, it is considered that no data exists. Otherwise, it is considered that data exists.
[0203] Step S1435: Output transmission line abnormality faults, such as CAN-H short circuited to power, CAN-H short circuited to ground, CAN-L short circuited to power, CAN-L short circuited to ground, CAN-H and CAN-L short circuited, etc.
[0204] Step S1436: Output CAN transceiver 106 type error.
[0205] Step S1437: Start the detection process of the terminal matching resistance on the CAN bus.
[0206] Step S1438: Determine whether the terminal matching resistance on the CAN bus is normal; if so, execute step S1439; otherwise, execute step S1440.
[0207] Here, in one example, the normal range of the terminal matching resistance may be 60Ω±5Ω.
[0208] Step S1439: Output a failure type of no data being sent to the terminal device.
[0209] Step S1440: outputting abnormal fault of the terminal matching resistor circuit, and further, outputting the measured resistance value of the terminal matching resistor.
[0210] Here, in an example, the resistance value of the terminal matching resistor on the CAN bus may be detected in the following manner. Specifically, the above detection to obtain the resistance value of the terminal matching resistor on the CAN bus may specifically include:
[0211] Triggering the microcontroller to send an enable signal to form a detection loop between the high voltage signal and the low voltage signal of the CAN differential signal;
[0212] The detection circuit is used to detect the resistance value between the high-voltage signal and the low-voltage signal of the CAN differential signal to obtain the resistance value of the terminal matching resistor.
[0213] In this way, the disclosed solution provides a solution for detecting the resistance value of the terminal matching resistor, which is simple, efficient, and provides support for large-scale engineering applications. At the same time, it also provides support for further improving the efficiency and convenience of fault location.
[0214] For example, in one example, as shown in FIG. 5( d ) and FIG. 5( e ), the detection process of the terminal matching resistance on the CAN bus (eg, step S1437 described above) may specifically include:
[0215] Step S14371: The microcontroller 100 sends a fourth signal to the programmable power circuit 105 so that the programmable power circuit 105 outputs a current signal.
[0216] Step S14372: The current signal passes through the first signal conditioning circuit 104, the line corresponding to CAN-H, and then through the terminal matching resistor and the line corresponding to CAN-L, and then returns to the first signal conditioning circuit 104, and then returns to the programmable power supply circuit 105 to form a detection loop.
[0217] Step S14373: The ADC module built into the microcontroller 100 measures the first signal conditioning circuit 104 based on the detection loop formed by the current signal to obtain the voltage values across the first resistor (which can be denoted as R1, which can be a preset value) built into the first signal conditioning circuit 104, such as the voltage value V1 and the voltage value V2.
[0218] Here, the voltage values across the first resistor built into the first signal conditioning circuit 104 may be: the voltage value corresponding to when the current signal flows into the first resistor (which may be recorded as V1), and the voltage value corresponding to when the current signal flows out of the first resistor (which may be recorded as V2).
[0219] Step S14374: Based on the voltage values across the first resistor (referred to as R1) built into the first signal conditioning circuit 104 obtained above, for example, voltage value V1 and voltage value V2, the resistance value between CAN-H and CAN-L, that is, the resistance value of the terminal matching resistor, is calculated.
[0220] For example, in one example, the resistance value of the terminal matching resistor (which may be denoted as R) may be calculated based on the following formula: R=(R1×V2) / (V1-V2).
[0221] In summary, the disclosed solution provides a CAN bus fault detection circuit and detection method for autonomous driving, which relates to the field of autonomous driving technology. Its beneficial effects include at least:
[0222] First, the disclosed solution realizes full-link detection and can quickly locate faults in upper-layer control or intermediate forwarding, transmission lines, and opposite-end equipment.
[0223] Second, the disclosed solution provides a real-time online CAN wiring status detection method, which can quickly locate faults such as short circuits on the wiring harness.
[0224] Third, the disclosed solution provides a method for verifying the CAN ID using MCU edge triggering, which can locate problems in devices such as CAN transceivers.
[0225] Fourthly, the disclosed solution provides a real-time terminal resistance detection method for a CAN bus, which can detect the terminal resistance of a wiring harness when necessary.
[0226] Fifth, the disclosed solution does not rely on external equipment and on-site operations, and can realize automated testing, effectively improving the efficiency of problem location and the convenience of testing.
[0227] The disclosed solution also provides a fault detection device, such as Figure 6 As shown, including:
[0228] A fault detection unit 601 is used to perform CAN bus fault detection on the autonomous driving domain controller when the CAN fault detection process is triggered; wherein the autonomous driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus;
[0229] Output unit 602, used to output fault type results;
[0230] Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
[0231] In a specific example of the disclosed solution, the fault detection unit is specifically used for at least one of the following:
[0232] Performing an initial detection process to detect data transmitted from the microcontroller to the central controller;
[0233] Executing a data detection process of the CAN bus to verify the buffered data of the CAN controller in the microcontroller;
[0234] Execute the detection process of other types of microcontroller errors to query the CAN error register value of the CAN controller in the microcontroller;
[0235] Execute the CAN ID verification process to verify the accuracy of the CAN ID;
[0236] The CAN wiring status detection process is executed to detect the wiring status of the CAN bus.
[0237] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0238] A first control instruction is generated based on the data detection result; wherein the first control instruction is used to indicate an output application layer software error, or to indicate execution of a data detection process of a CAN bus.
[0239] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0240] In the case where it is determined based on the data detection result that the data transmitted by the microcontroller to the central controller meets the transmission requirement, a first control instruction for indicating an output application layer software error is generated;
[0241] or,
[0242] When it is determined based on the data detection result that the data transmitted from the microcontroller to the central controller does not meet the transmission requirement, a first control instruction for instructing to execute a data detection process of the CAN bus is generated.
[0243] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0244] A second control instruction is generated based on the verification result, wherein the second control instruction is used to instruct the output of a microcontroller forwarding error, or to instruct the execution of a detection process for other microcontroller errors.
[0245] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0246] In the case where it is determined based on the verification result that the buffered data of the CAN controller meets the verification requirement, a second control instruction for indicating a forwarding type error of the output microcontroller is generated;
[0247] or,
[0248] When it is determined based on the verification result that the buffered data of the CAN controller does not meet the verification requirement, a second control instruction is generated to instruct execution of a detection process for other types of errors of the microcontroller.
[0249] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0250] A third control instruction is generated based on the CAN error register value, wherein the third control instruction is used to instruct the output of a preset second type error corresponding to the microcontroller, or to instruct the execution of a CAN ID verification process.
[0251] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0252] In a case where it is determined based on the CAN error register value that there is no preset first type error, generating a third control instruction instructing to output a preset second type error;
[0253] or,
[0254] When it is determined based on the CAN error register value that a preset first type error exists, a third control instruction for instructing execution of a CAN ID verification process is generated.
[0255] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0256] A fourth control instruction is generated based on the accuracy result, wherein the fourth control instruction is used to indicate an output CAN transceiver type error, or to indicate execution of a detection process of a CAN wiring status.
[0257] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0258] If it is determined based on the accuracy result that the CAN ID is accurate, generating a fourth control instruction indicating an output CAN transceiver class error;
[0259] or,
[0260] When it is determined based on the accuracy result that the CAN ID is inaccurate, a fourth control instruction is generated to instruct execution of a detection process of the CAN wiring state.
[0261] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0262] Based on the CAN differential signal of the CAN bus, determine the control segment arbitration ID of the CAN message;
[0263] Based on the arbitration ID of the control segment of the CAN message, the current CAN ID is verified.
[0264] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0265] Convert the CAN differential signal of the CAN bus into a single-ended signal;
[0266] attenuating the single-ended signal into a first signal that meets input requirements;
[0267] The first signal is input to the microcontroller to obtain the control segment arbitration ID of the CAN message.
[0268] In a specific example of the disclosed solution, the fault detection unit is specifically used for at least one of the following:
[0269] Detect the voltage status of the CAN bus;
[0270] Check whether there is data on the CAN bus;
[0271] The terminal matching resistor on the CAN bus is detected; wherein the terminal matching resistor is located between the high voltage signal and the low voltage signal of the CAN differential signal on the CAN bus.
[0272] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0273] Collect and obtain the voltage status of the CAN bus;
[0274] A fifth control instruction is generated based on the voltage state; wherein the fifth control instruction is used to indicate an abnormal transmission line fault that matches the output voltage state, or to indicate a detection of whether there is data on the CAN bus.
[0275] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0276] Adjusting a high voltage signal of a CAN differential signal of a CAN bus into a second signal;
[0277] Adjusting the low voltage signal of the CAN differential signal of the CAN bus into a third signal;
[0278] The second signal and the third signal are input to the microcontroller to acquire the voltage state of the CAN bus.
[0279] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0280] When it is determined based on the voltage state of the CAN bus that the silent voltage state does not meet the voltage requirement, a fifth control instruction is generated for indicating an abnormal transmission line fault matching the output voltage state;
[0281] or,
[0282] When it is determined based on the voltage state of the CAN bus that the silent voltage state meets the voltage requirement, a fifth control instruction is generated to instruct to detect whether there is data on the CAN bus.
[0283] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0284] A sixth control instruction is generated based on the data existence result, wherein the sixth control instruction is used to indicate an output CAN transceiver type error, or to indicate detection of a terminal resistance on the CAN bus.
[0285] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0286] In a case where it is determined based on the data existence result that data exists on the CAN bus, generating a sixth control instruction for indicating an output CAN transceiver type error;
[0287] or,
[0288] When it is determined based on the data existence result that no data exists on the CAN bus, a sixth control instruction for instructing detection of a terminal resistance on the CAN bus is generated.
[0289] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0290] Detect and obtain the resistance value of the terminal matching resistor on the CAN bus;
[0291] A seventh control instruction is generated based on the resistance value of the terminal matching resistor, wherein the seventh control instruction is used to indicate an output terminal resistance abnormality error, or an output peer device no data sent error.
[0292] In a specific example of the disclosed solution, the fault detection unit is specifically used to:
[0293] Triggering the microcontroller to send an enable signal to form a detection loop between the high voltage signal and the low voltage signal of the CAN differential signal;
[0294] The detection circuit is used to detect the resistance value between the high-voltage signal and the low-voltage signal of the CAN differential signal to obtain the resistance value of the terminal matching resistor.
[0295] For the description of the specific functions and examples of each unit of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0296] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0297] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0298] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0299] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0300] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0301] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a fault detection method. For example, in some embodiments, the fault detection method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the fault detection method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the fault detection method in any other appropriate manner (e.g., by means of firmware).
[0302] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0303] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0304] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0305] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0306] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0307] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0308] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0309] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A fault detection method, include: When the controller area network CAN fault detection process is triggered, a CAN bus fault detection is performed on the autonomous driving domain controller; wherein the autonomous driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus; Output fault results; Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
2. The method according to claim 1, in, Perform CAN bus fault detection on the autonomous driving domain controller, including at least one of the following: Performing an initial detection process to detect data transmitted from the microcontroller to the central controller; Executing a data detection process of the CAN bus to verify the buffered data of the CAN controller in the microcontroller; Execute the detection process of other types of microcontroller errors to query the CAN error register value of the CAN controller in the microcontroller; Execute the CAN ID verification process to verify the accuracy of the CAN ID; The CAN wiring status detection process is executed to detect the wiring status of the CAN bus.
3. The method according to claim 2, in, The initial detection process is performed to detect the data transmitted from the microcontroller to the central controller, including: A first control instruction is generated based on the data detection result; wherein the first control instruction is used to indicate an output application layer software error, or to indicate execution of a data detection process of a CAN bus.
4. The method according to claim 3, in, The generating a first control instruction based on the data detection result includes: In the case where it is determined based on the data detection result that the data transmitted by the microcontroller to the central controller meets the transmission requirement, a first control instruction for indicating an output application layer software error is generated; or, When it is determined based on the data detection result that the data transmitted from the microcontroller to the central controller does not meet the transmission requirement, a first control instruction for instructing to execute a data detection process of the CAN bus is generated.
5. The method according to claim 2, in, The data detection process of executing the CAN bus to verify the buffered data of the CAN controller in the microcontroller includes: A second control instruction is generated based on the verification result, wherein the second control instruction is used to instruct the output of a microcontroller forwarding error, or to instruct the execution of a detection process for other microcontroller errors.
6. The method according to claim 5, in, The generating a second control instruction based on the verification result includes: In the case where it is determined based on the verification result that the buffered data of the CAN controller meets the verification requirement, a second control instruction for indicating a forwarding type error of the output microcontroller is generated; or, When it is determined based on the verification result that the buffered data of the CAN controller does not meet the verification requirement, a second control instruction is generated to instruct execution of a detection process for other types of errors of the microcontroller.
7. The method according to claim 2, in, The execution of the detection process of other types of errors of the microcontroller to query the CAN error register value of the CAN controller in the microcontroller includes: A third control instruction is generated based on the CAN error register value, wherein the third control instruction is used to instruct the output of a preset second type error corresponding to the microcontroller, or to instruct the execution of a CANID verification process.
8. The method according to claim 7, in, The generating of the third control instruction based on the CAN error register value comprises: In a case where it is determined based on the CAN error register value that there is no preset first type error, generating a third control instruction instructing to output a preset second type error; or, When it is determined based on the CAN error register value that a preset first type error exists, a third control instruction for instructing execution of a CANID verification process is generated.
9. The method according to claim 2, in, The verification process of executing the CAN ID to verify the accuracy of the CAN ID includes: A fourth control instruction is generated based on the accuracy result, wherein the fourth control instruction is used to indicate an output CAN transceiver type error, or to indicate execution of a detection process of a CAN wiring status.
10. The method according to claim 9, in, The generating a fourth control instruction based on the accuracy result comprises: If it is determined based on the accuracy result that the CANID is accurate, generating a fourth control instruction indicating an output CAN transceiver class error; or, When it is determined based on the accuracy result that the CAN ID is inaccurate, a fourth control instruction is generated to instruct execution of a detection process of the CAN wiring state.
11. The method according to claim 2, 9 or 10, in, The verification process of the CANID includes: Based on the CAN differential signal of the CAN bus, determine the control segment arbitration ID of the CAN message; Based on the arbitration ID of the control segment of the CAN message, the current CANID is verified.
12. The method according to claim 11, in, The method of determining the control segment arbitration ID of the CAN message based on the CAN differential signal of the CAN bus includes: Convert the CAN differential signal of the CAN bus into a single-ended signal; attenuating the single-ended signal into a first signal that meets input requirements; The first signal is input to the microcontroller to obtain the control segment arbitration ID of the CAN message.
13. The method according to claim 2, in, The process of executing the detection process of the CAN connection state to detect the connection state of the CAN bus includes at least one of the following: Detect the voltage status of the CAN bus; Check whether there is data on the CAN bus; The terminal matching resistor on the CAN bus is detected; wherein the terminal matching resistor is located between the high voltage signal and the low voltage signal of the CAN differential signal on the CAN bus.
14. The method according to claim 13, in, The detecting of the voltage state of the CAN bus includes: Collect and obtain the voltage status of the CAN bus; A fifth control instruction is generated based on the voltage state; wherein the fifth control instruction is used to indicate an abnormal transmission line fault that matches the output voltage state, or to indicate a detection of whether there is data on the CAN bus.
15. The method according to claim 14, in, The collecting and obtaining the voltage state of the CAN bus includes: Adjusting a high voltage signal of a CAN differential signal of a CAN bus into a second signal; Adjusting the low voltage signal of the CAN differential signal of the CAN bus into a third signal; The second signal and the third signal are input to the microcontroller to acquire the voltage state of the CAN bus.
16. The method according to claim 14 or 15, in, The generating a fifth control instruction based on the voltage state comprises: When it is determined based on the voltage state of the CAN bus that the silent voltage state does not meet the voltage requirement, a fifth control instruction is generated for indicating an abnormal transmission line fault matching the output voltage state; or, When it is determined based on the voltage state of the CAN bus that the silent voltage state meets the voltage requirement, a fifth control instruction is generated to instruct to detect whether there is data on the CAN bus.
17. The method according to claim 13, in, The detecting whether there is data on the CAN bus comprises: A sixth control instruction is generated based on the data existence result, wherein the sixth control instruction is used to indicate an output CAN transceiver type error, or to indicate detection of a terminal resistance on the CAN bus.
18. The method according to claim 17, in, The generating a sixth control instruction based on the data existence result comprises: In a case where it is determined based on the data existence result that data exists on the CAN bus, generating a sixth control instruction for indicating an output CAN transceiver type error; or, When it is determined based on the data existence result that no data exists on the CAN bus, a sixth control instruction for instructing detection of a terminal resistance on the CAN bus is generated.
19. The method according to claim 13, in, The detecting of the terminal matching resistance on the CAN bus includes: Detect and obtain the resistance value of the terminal matching resistor on the CAN bus; A seventh control instruction is generated based on the resistance value of the terminal matching resistor, wherein the seventh control instruction is used to indicate an output terminal resistance abnormality error, or an output peer device no data sent error.
20. The method according to claim 19, in, The detection obtains the resistance value of the terminal matching resistor on the CAN bus, including: Triggering the microcontroller to send an enable signal to form a detection loop between the high voltage signal and the low voltage signal of the CAN differential signal; The detection circuit is used to detect the resistance value between the high-voltage signal and the low-voltage signal of the CAN differential signal to obtain the resistance value of the terminal matching resistor.
21. A fault detection device, include: A fault detection unit, configured to perform CAN bus fault detection on the autonomous driving domain controller when the CAN fault detection process is triggered; wherein the autonomous driving controller is provided with at least a central processing unit, a microcontroller and a CAN transceiver connected via a CAN bus; Output unit, used to output fault results; Among them, the fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type errors; CAN transceiver type errors; preset type errors corresponding to the microcontroller; CAN bus transmission line type errors; terminal resistance abnormality type errors in the CAN bus; and the peer device of the autonomous driving domain controller has no data sending type fault.
22. The device according to claim 21, in, The fault detection unit is specifically used for at least one of the following: Performing an initial detection process to detect data transmitted from the microcontroller to the central controller; Executing a data detection process of the CAN bus to verify the buffered data of the CAN controller in the microcontroller; Execute the detection process of other types of microcontroller errors to query the CAN error register value of the CAN controller in the microcontroller; Execute the CANID verification process to verify the accuracy of the CANID; The CAN wiring status detection process is executed to detect the wiring status of the CAN bus.
23. The device according to claim 22, in, The fault detection unit is specifically used for: A first control instruction is generated based on the data detection result; wherein the first control instruction is used to indicate an output application layer software error, or to indicate execution of a data detection process of a CAN bus.
24. The device according to claim 23, in, The fault detection unit is specifically used for: In the case where it is determined based on the data detection result that the data transmitted by the microcontroller to the central controller meets the transmission requirement, a first control instruction for indicating an output application layer software error is generated; or, When it is determined based on the data detection result that the data transmitted from the microcontroller to the central controller does not meet the transmission requirement, a first control instruction for instructing to execute a data detection process of the CAN bus is generated.
25. The device according to claim 22, in, The fault detection unit is specifically used for: A second control instruction is generated based on the verification result, wherein the second control instruction is used to instruct the output of a microcontroller forwarding error, or to instruct the execution of a detection process for other microcontroller errors.
26. The device according to claim 25, in, The fault detection unit is specifically used for: In the case where it is determined based on the verification result that the buffered data of the CAN controller meets the verification requirement, a second control instruction for indicating a forwarding type error of the output microcontroller is generated; or, When it is determined based on the verification result that the buffered data of the CAN controller does not meet the verification requirement, a second control instruction is generated to instruct execution of a detection process for other types of errors of the microcontroller.
27. The device according to claim 22, in, The fault detection unit is specifically used for: A third control instruction is generated based on the CAN error register value, wherein the third control instruction is used to instruct the output of a preset second type error corresponding to the microcontroller, or to instruct the execution of a CANID verification process.
28. The device according to claim 27, in, The fault detection unit is specifically used for: In a case where it is determined based on the CAN error register value that there is no preset first type error, generating a third control instruction instructing to output a preset second type error; or, When it is determined based on the CAN error register value that a preset first type error exists, a third control instruction for instructing execution of a CANID verification process is generated.
29. The device according to claim 22, in, The fault detection unit is specifically used for: A fourth control instruction is generated based on the accuracy result, wherein the fourth control instruction is used to indicate an output CAN transceiver type error, or to indicate execution of a detection process of a CAN wiring status.
30. The device according to claim 29, in, The fault detection unit is specifically used for: If it is determined based on the accuracy result that the CANID is accurate, generating a fourth control instruction indicating an output CAN transceiver class error; or, When it is determined based on the accuracy result that the CANID is inaccurate, a fourth control instruction is generated to instruct execution of a detection process of the CAN wiring state.
31. The device according to claim 22, 29 or 30, in, The fault detection unit is specifically used for: Based on the CAN differential signal of the CAN bus, determine the control segment arbitration ID of the CAN message; Based on the arbitration ID of the control segment of the CAN message, the current CANID is verified.
32. The device according to claim 31, in, The fault detection unit is specifically used for: Convert the CAN differential signal of the CAN bus into a single-ended signal; attenuating the single-ended signal into a first signal that meets input requirements; The first signal is input to the microcontroller to obtain the control segment arbitration ID of the CAN message.
33. The device according to claim 22, in, The fault detection unit is specifically used for at least one of the following: Detect the voltage status of the CAN bus; Check whether there is data on the CAN bus; The terminal matching resistor on the CAN bus is detected; wherein the terminal matching resistor is located between the high voltage signal and the low voltage signal of the CAN differential signal on the CAN bus.
34. The device according to claim 33, in, The fault detection unit is specifically used for: Collect and obtain the voltage status of the CAN bus; A fifth control instruction is generated based on the voltage state; wherein the fifth control instruction is used to indicate an abnormal transmission line fault that matches the output voltage state, or to indicate a detection of whether there is data on the CAN bus.
35. The device according to claim 34, in, The fault detection unit is specifically used for: Adjusting a high voltage signal of a CAN differential signal of a CAN bus into a second signal; Adjusting the low voltage signal of the CAN differential signal of the CAN bus into a third signal; The second signal and the third signal are input to the microcontroller to acquire the voltage state of the CAN bus.
36. The device according to claim 34 or 35, in, The fault detection unit is specifically used for: When it is determined based on the voltage state of the CAN bus that the silent voltage state does not meet the voltage requirement, a fifth control instruction is generated for indicating an abnormal transmission line fault matching the output voltage state; or, When it is determined based on the voltage state of the CAN bus that the silent voltage state meets the voltage requirement, a fifth control instruction is generated to instruct to detect whether there is data on the CAN bus.
37. The device according to claim 33, in, The fault detection unit is specifically used for: A sixth control instruction is generated based on the data existence result, wherein the sixth control instruction is used to indicate an output CAN transceiver type error, or to indicate detection of a terminal resistance on the CAN bus.
38. The device according to claim 37, in, The fault detection unit is specifically used for: In a case where it is determined based on the data existence result that data exists on the CAN bus, generating a sixth control instruction for indicating an output CAN transceiver type error; or, When it is determined based on the data existence result that no data exists on the CAN bus, a sixth control instruction for instructing detection of a terminal resistance on the CAN bus is generated.
39. The device according to claim 33, in, The fault detection unit is specifically used for: Detect and obtain the resistance value of the terminal matching resistor on the CAN bus; A seventh control instruction is generated based on the resistance value of the terminal matching resistor, wherein the seventh control instruction is used to indicate an output terminal resistance abnormality error, or an output peer device no data sent error.
40. The device according to claim 39, in, The fault detection unit is specifically used for: Triggering the microcontroller to send an enable signal to form a detection loop between the high voltage signal and the low voltage signal of the CAN differential signal; The detection circuit is used to detect the resistance value between the high-voltage signal and the low-voltage signal of the CAN differential signal to obtain the resistance value of the terminal matching resistor.
41. A fault detection circuit for an autonomous driving domain controller, in, The autonomous driving domain controller is provided with at least a central controller, a microcontroller, and a CAN transceiver connected via a CAN bus; The fault detection circuit is connected to the central controller, the microcontroller, and the CAN transceiver provided in the autonomous driving domain controller to perform a CAN fault detection process and obtain a fault type result; The fault type result is one of the faults in the preset fault set; the preset fault set includes at least two of the following: application layer software control type error; CAN transceiver type error; preset type error corresponding to the microcontroller; CAN bus transmission line type error; CAN bus terminal resistance abnormality type error; The peer device of the autonomous driving domain controller has no data to send.
42. The circuit according to claim 41, in, The fault detection circuit is built into the autonomous driving domain controller.
43. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 20.
44. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-20.
45. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 20.
Citation Information
Cited By
CAN bus fault self-diagnosis method, device and system for embedded system
CN121262031A
Method, device and system for fault self-diagnosis of a can bus for embedded systems
CN121262031B
