Disclosure of Invention
Based on the problems, the application provides a fault diagnosis device, a fault diagnosis method and a vehicle, which can accurately locate communication faults of the vehicle and reduce fault troubleshooting difficulty.
The embodiment of the application discloses the following technical scheme:
in a first aspect, the present application provides a fault diagnosis apparatus for performing fault diagnosis on a communication system of a vehicle, the communication system including: a plurality of CAN buses and a plurality of control modules;
each control module comprises a controller, a first relay and a second relay, wherein the controller is connected with a High line of a corresponding CAN bus through the first relay, and is connected with a Low line of the corresponding CAN bus through the second relay;
at least one control module is connected between a first end and a second end of each CAN bus in the plurality of CAN buses;
the device comprises: a diagnostic controller;
the diagnosis controller is respectively connected with the second end of the High line of each CAN bus and the second end of the Low line of each CAN bus;
the diagnosis controller is used for determining the fault position of the CAN bus by controlling the first relay and the second relay in each control module of the CAN bus when the voltage of the second end of the High line or the voltage of the second end of the Low line of the CAN bus is abnormal.
Optionally, the diagnostic controller is specifically configured to:
when the diagnosis controller detects that the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is larger than a first preset threshold value, the first relay and the second relay in one control module of the CAN bus are controlled to be disconnected; if the voltage is recovered to be normal, determining that the control module fails, if the voltage is not recovered to be normal, controlling a first relay and a second relay in the control module to be closed, and sequentially controlling the first relay and the second relay in other control modules of the CAN bus to be disconnected so as to determine the failure position of the CAN bus.
Optionally, the diagnostic controller is specifically configured to:
when the diagnosis controller detects that the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is larger than a second preset threshold value, the first relays and the second relays in all the control modules of the CAN bus are controlled to be disconnected; and if the voltage is recovered to be normal, determining that the CAN bus fails.
Optionally, the diagnostic controller is specifically configured to:
and when the diagnosis controller detects that the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is zero, determining that the second end of the High line of the CAN bus or the second end of the Low line of the CAN bus has faults.
Optionally, the diagnostic controller is specifically configured to:
when the diagnosis controller detects that the voltage of the second end of the High line of the CAN bus is equal to the voltage of the second end of the Low line of the CAN bus, the first relay or the second relay in one control module of the CAN bus is controlled to be disconnected; if the voltage is recovered to be normal, determining that a wire harness of a corresponding relay in the control module fails, if the voltage is not recovered to be normal, controlling the disconnected relay in one control module of the CAN bus to be closed, and sequentially controlling the first relay or the second relay in the control module of the CAN bus or other control modules to be disconnected so as to determine the failure position of the CAN bus.
Optionally, the diagnostic controller is specifically configured to:
if the wire harnesses of the relays corresponding to all the control modules do not fail, determining that the CAN bus fails.
Optionally, the apparatus further comprises: gateway controller and OBD diagnostic port;
the gateway controller is respectively connected with the first end of the High line of each CAN bus and the first end of the Low line of each CAN bus;
the OBD diagnosis port is respectively connected with the second end of the High line of each CAN bus and the second end of the Low line of each CAN bus and is connected below the diagnosis controller;
the gateway controller is used for forwarding the communication message;
and the OBD diagnosis port is used for debugging communication faults.
Compared with the prior art, the application has the following beneficial effects:
in the application, the diagnosis controller is respectively connected with the second end of the High line of each CAN bus and the second end of the Low line of each CAN bus. The voltage information of the second end of the High line or the voltage information of the second end of the Low line of the CAN bus is detected through the diagnosis controller, and when the voltage information is abnormal, the specific fault position of the CAN bus is determined through controlling the first relay and the second relay in each control module of the CAN bus. Thus, even if the cause of the failure of the vehicle communication system is not on the CAN bus, the specific failure location CAN be determined by controlling the relay through the diagnostic controller. Therefore, the communication fault positioning accuracy of the vehicle is improved, and the fault checking difficulty is reduced.
In a second aspect, the present application provides a method for fault diagnosis for a communication system of a vehicle, the communication system including: a plurality of CAN buses and a plurality of control modules;
each control module comprises a controller, a first relay and a second relay, wherein the controller is connected with a High line of a corresponding CAN bus through the first relay, and is connected with a Low line of the corresponding CAN bus through the second relay;
at least one control module is connected between a first end and a second end of each CAN bus in the plurality of CAN buses;
the method is applied to a diagnosis controller, and the diagnosis controller is respectively connected with the second end of the High line of each CAN bus and the second end of the Low line of each CAN bus;
the method comprises the following steps:
when the voltage of the second end of the High line or the voltage of the second end of the Low line of the CAN bus is abnormal, the fault position of the CAN bus is determined by controlling a first relay and a second relay in each control module of the CAN bus.
Optionally, when there is an abnormality in the second terminal voltage of the High line or the second terminal of the Low line of the CAN bus, determining, by controlling the first relay and the second relay in each control module of the CAN bus, a fault location of the CAN bus specifically includes:
when the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is detected to be larger than a first preset threshold value, a first relay and a second relay in one control module of the CAN bus are controlled to be disconnected;
if the voltage is recovered to be normal, determining that the control module fails;
if the voltage is not recovered to be normal, the first relay and the second relay in the control module are controlled to be closed, and the first relay and the second relay in other control modules of the CAN bus are controlled to be opened in sequence, so that the fault position of the CAN bus is determined.
Optionally, when there is an abnormality in the second terminal voltage of the High line or the second terminal of the Low line of the CAN bus, determining, by controlling the first relay and the second relay in each control module of the CAN bus, a fault location of the CAN bus specifically includes:
when the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is detected to be larger than a second preset threshold value, the first relays and the second relays in all the control modules of the CAN bus are controlled to be disconnected;
and if the voltage is recovered to be normal, determining that the CAN bus fails.
Optionally, when there is an abnormality in the second terminal voltage of the High line or the second terminal of the Low line of the CAN bus, determining, by controlling the first relay and the second relay in each control module of the CAN bus, a fault location of the CAN bus specifically includes:
and when the voltage of the second end of the High line of the CAN bus or the voltage of the second end of the Low line of the CAN bus is detected to be zero, determining that the second end of the High line of the CAN bus or the second end of the Low line of the CAN bus has faults.
Optionally, when there is an abnormality in the second terminal voltage of the High line or the second terminal of the Low line of the CAN bus, determining, by controlling the first relay and the second relay in each control module of the CAN bus, a fault location of the CAN bus specifically includes:
when the voltage of the second end of the High line of the CAN bus is detected to be equal to the voltage of the second end of the Low line of the CAN bus, a first relay or a second relay in one control module of the CAN bus is controlled to be disconnected;
if the voltage is recovered to be normal, determining that the wiring harness of the corresponding relay in the control module fails;
if the voltage is not recovered to be normal, controlling an open relay in one control module of the CAN bus to be closed, and sequentially controlling a first relay or a second relay in the control module of the CAN bus or other control modules to be open so as to determine the fault position of the CAN bus.
Optionally, when there is an abnormality in the second terminal voltage of the High line or the second terminal of the Low line of the CAN bus, determining, by controlling the first relay and the second relay in each control module of the CAN bus, a fault location of the CAN bus specifically includes:
if the wire harnesses of the relays corresponding to all the control modules do not fail, determining that the CAN bus fails.
In a third aspect, the present application provides a vehicle implementing the apparatus for fault diagnosis provided in the first aspect.
Detailed Description
In order to enable those skilled in the art to more clearly understand the technical solutions of the present application, the application scenario of the present application solution is first described below.
The controller area network bus (Controller Area Network, CAN) is a serial communication protocol bus for real-time applications that CAN use twisted pair wires to transmit signals, one of the most widely used fieldbuses, and the CAN protocol is used for communication between various components in an automobile. In general, the fault detection of the whole vehicle controller on the communication quality problem is to detect CAN bus error frames, and report a busoff fault when the number of the error frames exceeds a preset threshold.
At present, a plurality of parts exist in the vehicle and are communicated through a CAN wire, if a part communication harness has a problem, when the voltage of the CAN wire is abnormal, the standard of the whole vehicle controller for communicating the CAN wire to report the busoff fault cannot be met. Meanwhile, the communication quality of the whole vehicle can be influenced by the communication problem. The fault diagnosis device can not diagnose corresponding faults of the whole vehicle communication wire harness, and brings difficulty to the troubleshooting of the whole vehicle. The cause of the communication failure can not be accurately located.
In order to solve the technical problems, the application provides a fault diagnosis device and method and a vehicle. In this application, every control module includes controller, first relay and second relay, and the controller passes through the High line of the CAN bus that first relay connection corresponds to pass through the Low line of the CAN bus that second relay connection corresponds. The diagnosis controller is respectively connected with the second end of the High line of each CAN bus and the second end of the Low line of each CAN bus. The voltage information of the second end of the High line or the voltage information of the second end of the Low line of the CAN bus is detected through the diagnosis controller, and when the voltage information is abnormal, the specific fault position of the CAN bus is determined through controlling the first relay and the second relay in each control module of the CAN bus. Thus, even if the cause of the failure of the vehicle communication system is not on the CAN bus, the specific failure location CAN be determined by controlling the relay through the diagnostic controller. Therefore, the communication fault positioning accuracy of the vehicle is improved, and the fault checking difficulty is reduced.
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Fig. 1 is a schematic structural diagram of a fault diagnosis device according to an embodiment of the present application. As shown in fig. 1, the apparatus includes: the controller 100 is diagnosed.
The fault diagnosis device is used for carrying out fault diagnosis on the communication system of the vehicle. Wherein, the communication system of vehicle includes: a plurality of CAN buses 200, a plurality of control modules 300.
Each control module 300 includes a controller 301, a first relay 302, and a second relay 303.
In this embodiment, as shown in fig. 1, the CAN buses 200 are exemplified as 2 CAN buses, the left is CAN bus 201, and the right is CAN bus 202, and it is understood that more CAN buses 200 may be provided or one CAN bus 200 may be provided according to requirements. The control modules 300 are illustrated as 4 control modules, two control modules 300 are connected to each CAN bus 200, control modules 310 and 320 are connected to CAN bus 201, and control modules 330 and 340 are connected to CAN bus 202. It is understood that more control modules 300 may be connected to each CAN bus 200.
The controller 301 is connected to the High line of the corresponding CAN bus through the first relay 302, and is connected to the Low line of the corresponding CAN bus through the second relay 303. At least one control module 300 is connected between the first end and the second end of each CAN bus 200 of the plurality of CAN buses 200.
In this embodiment, an end of the CAN bus 200 close to the diagnostic controller 100 is used as the second end, and an end of the CAN bus 200 far from the diagnostic controller 100 is used as the first end.
Each first relay 302 and each second relay 303 are connected at a position distant from each controller 301 near the CAN bus 200. In the absence of fault detection, each first relay 302 and each second relay 303 are all in a closed state to ensure that the controller 301 is operating online.
The diagnostic controller 100 includes a plurality of first interfaces 101, a plurality of second interfaces 102, and a plurality of third interfaces 103, as shown in fig. 2.
The diagnostic controller 100 is connected to the second end of the High line of each CAN bus 200 and the second end of the Low line of each CAN bus, respectively. In the present embodiment, an interface where the diagnostic controller 100 is connected to the second end of the High line of each CAN bus 200 is called a first interface 101, and an interface where the diagnostic controller 100 is connected to the second end of the Low line of each CAN bus 200 is called a second interface 102.
The voltage of the second end of the High line of the corresponding connected CAN bus 200 CAN be detected by the first interface 101 of the diagnostic controller 100, and the voltage of the second end of the Low line of the corresponding connected CAN bus 200 CAN be detected by the second interface 102 of the diagnostic controller 100. And determining whether a fault affecting the communication quality exists by judging whether the detected voltage is abnormal or not.
When the diagnosis controller 100 detects that the voltage at the second end of the High line or the voltage at the second end of the Low line of the CAN bus 200 is abnormal, the first relay 302 and the second relay 303 in each control module 300 of the CAN bus 200 are controlled to be closed or opened through the third interface 103, so as to determine a specific fault position of the CAN bus 200. Each third interface 103 controls the closing or opening of one relay.
Specifically, when the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 200 or the voltage of the second end of the Low line of the CAN bus 200 is greater than the first preset threshold, it CAN diagnose that the voltage of the wire harness of a certain node on the CAN bus 200 is abnormal. At this time, one control module 300 is used as one node.
The third interface 103 of the diagnostic controller 100 controls the opening of the corresponding first relay 302 and the corresponding second relay 303 in one control module 300 of the CAN bus 200. If the voltage is recovered to be normal at this time, it is determined that the control module 300 fails. If the voltage is not recovered, the first relay 302 and the second relay 303 in the control module 300 are controlled to be closed, and the first relay 302 and the second relay 303 in the other control modules 300 of the CAN bus 200 are controlled to be opened in sequence, so as to determine the fault position of the CAN bus 200.
For example, taking CAN bus 201 as an example, CAN bus 201 is connected to control module 310 and control module 320. Each control module comprises a controller 301, a first relay 302 and a second relay 303. When the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 201 or the voltage of the second end of the Low line of the CAN bus 201 is greater than the first preset threshold, the third interface 103 of the diagnostic controller 100 controls the first relay 302 and the second relay 303 of the control module 310 to be turned off. If the voltage detected by the diagnostic controller 100 returns to normal at this time, it is determined that the node of the control module 310 has failed. If the voltage detected by the diagnostic controller 100 is not recovered, the first relay 302 and the second relay 303 of the control module 310 are first closed, and then the first relay 302 and the second relay 303 of the control module 320 are opened to determine whether the node of the control module 320 is faulty. It will be appreciated that when there are more than two control modules 300 on the CAN bus 201, the same method as described above is used to detect other control modules 300 until a failed node CAN be located.
Specifically, when the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 200 or the voltage of the second end of the Low line of the CAN bus 200 is greater than the second preset threshold, there may be a case where the CAN bus 200 causes a short circuit to the power supply.
The third interface 103 of the diagnostic controller 100 controls the opening of the corresponding first relay 301 and the corresponding second relay 302 in all control modules 300 of all CAN-buses 200. At this time, if the voltage returns to normal, it is determined that the CAN bus 200 has failed.
For example, taking CAN bus 201 as an example, CAN bus 201 is connected to control module 310 and control module 320. Each control module comprises a controller 301, a first relay 302 and a second relay 303.
When the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 201 or the voltage of the second end of the Low line of the CAN bus 201 is greater than the second preset threshold, the third interface 103 of the diagnostic controller 100 controls the first relay 302 and the second relay 303 of all the control modules of the CAN bus 201 to be disconnected. If the voltage detected by the diagnostic controller 100 is recovered to be normal at this time, it is determined that the CAN bus 201 is malfunctioning.
Specifically, when the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 200 or the voltage of the second end of the Low line of the CAN bus 200 is zero, it determines that the second end of the High line of the CAN bus 200 or the second end of the Low line of the CAN bus 200 has a fault, and it may determine that there is an open circuit between the second end of the CAN bus 200 and the control module 300 closest to the second end of the CAN bus 200.
For example, taking CAN bus 201 as an example, CAN bus 201 is connected to control module 310 and control module 320. Each control module comprises a controller 301, a first relay 302 and a second relay 303.
When the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 201 or the voltage of the second end of the Low line of the CAN bus 201 is equal to zero, it determines that the second end of the High line of the CAN bus 201 or the second end of the Low line of the CAN bus 201 is faulty, and it may determine that there is an open circuit between the second end of the CAN bus 201 and the control module 320 closest to the second end of the CAN bus 201.
Specifically, when the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 200 is equal to the voltage of the second end of the Low line of the CAN bus 200, the first relay 302 or the second relay 303 in one control module 300 of the CAN bus 200 is controlled to be turned off.
At this time, if the voltage detected by the diagnostic controller 100 is recovered to be normal at this time, it is determined that a wire harness of a corresponding relay in the control module 300 is failed, and if the voltage detected by the diagnostic controller 100 is not recovered to be normal at this time, the opened relay in one control module 300 of the CAN bus 200 is controlled to be closed, and the first relay 302 or the second relay 303 in the control module 300 of the CAN bus 200 or other control modules 300 is controlled to be opened in sequence until the failure position of the CAN bus CAN be determined.
If the wire harness of the corresponding relay in all the control modules 300 fails, it is determined that the CAN bus 200 fails.
For example, taking CAN bus 201 as an example, CAN bus 201 is connected to control module 310 and control module 320. Each control module comprises a controller 301, a first relay 302 and a second relay 303.
When the diagnostic controller 100 detects that the voltage of the second end of the High line of the CAN bus 201 is equal to the voltage of the second end of the Low line of the CAN bus 201, the first relay 302 in the control module 310 on the CAN bus 201 is controlled to be turned off by the third interface 103 corresponding to the diagnostic controller 100.
At this time, if the voltage detected by the diagnostic controller 100 is recovered to be normal, it is determined that the communication harness of the first relay 302 in the control module 310 fails, and if the voltage detected by the diagnostic controller 100 is not recovered to be normal, the first relay 302 in the control module 310 is controlled to be closed by the third interface 103 corresponding to the diagnostic controller 100, and the second relay 303 of the control module 310 on the CAN bus 201 is controlled to be opened by the third interface 103 corresponding to the diagnostic controller 100.
If the voltage is recovered to be normal, it is determined that the communication harness of the second relay 303 in the control module 310 fails, and if the voltage is not recovered to be normal, the relay of the control module 320 is continuously controlled to be disconnected and the above operation is repeated until the fault location can be determined, where the fault may be that the communication harness has a short circuit problem.
When the communication harness of all the relays in the control module 310 and the control module 320 fails, it is determined that the CAN bus 201 fails, that is, the CAN bus 201 is shorted.
In addition, the apparatus includes a gateway controller 400 and an OBD diagnostic port 500, as shown in fig. 2.
The gateway controller 400 is connected to a first end of the High line of each CAN bus 200 and a first end of the Low line of each CAN bus 200, that is, an end remote from the diagnostic controller 100, respectively. The gateway controller 400 is configured to forward the communication message to the CAN bus 200.
The OBD diagnostic port 500 is connected to the second end of the High line of each CAN bus 200 and the second end of the Low line of each CAN bus 200, respectively, and is connected below the diagnostic controller 100. The OBD diagnostic port 500 is a port reserved in the vehicle for debugging communication failures in connection with an upper computer.
In this application, each control module 300 includes a controller 301, a first relay 302, and a second relay 303, where the controller 301 is connected to a High line of the corresponding CAN bus 200 through the first relay 302, and is connected to a Low line of the corresponding CAN bus 200 through the second relay 303. The diagnostic controller 100 is connected to the second end of the High line of each CAN bus 200 and the second end of the Low line of each CAN bus 200, respectively. When the diagnosis controller 100 detects that there is an abnormality in the voltage of the second end of the High line or the voltage of the second end of the Low line of the CAN bus 200, a specific fault location of the CAN bus 200 is determined by controlling the first relay 302 and the second relay 303 in each control module 300 of the CAN bus 200. Thus, even if the cause of the failure of the vehicle communication system is not on the CAN bus, the specific failure location CAN be determined by controlling the relay through the diagnostic controller. Therefore, the communication fault positioning accuracy of the vehicle is improved, and the fault checking difficulty is reduced.
Fig. 3 is a flowchart of a fault diagnosis method according to an embodiment of the present application. As shown in fig. 3, the method includes:
s301: and acquiring voltage information of a second end of a High line or voltage information of a second end of a Low line of the CAN bus.
The interface of the diagnosis controller is respectively connected with the second end of the High line of the CAN bus and the second end of the Low line of the CAN bus. The voltage information of the CAN bus at the moment CAN be acquired through the connection interface.
S302: detecting whether the acquired voltage information is abnormal.
If the voltage information acquired in S301 is abnormal, S303 is executed; if the voltage information acquired in S301 is not abnormal, S301 is executed to continuously monitor and detect the voltage information of the CAN bus.
S303: and controlling a first relay and a second relay in each control module of the CAN bus, and determining the fault position of the CAN bus.
When the voltage is abnormal, the first relay and the second relay of the control module are controlled to be opened or closed according to the abnormal condition, so that the specific fault position of the CAN bus is determined.
The specific detection method for opening or closing the first relay and the second relay of the control module is consistent with the specific detection method according to different abnormal conditions, and is not repeated here.
In the application, whether the corresponding control module node has communication faults or not is detected by controlling the opening or closing of the relay of the control module on the CAN bus. Even if the cause of the failure of the vehicle communication system is not on the CAN bus, a specific failure location CAN be determined by controlling the relay. Therefore, the communication fault positioning accuracy of the vehicle is improved, and the fault checking difficulty is reduced.
The embodiment of the application also provides a vehicle, which comprises the fault diagnosis device. The method and the device are used for realizing the scheme provided by the embodiment of the application.
The "first" and "second" in the names of "first", "second" (where present) and the like in the embodiments of the present application are used for name identification only, and do not represent the first and second in sequence.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for method embodiments, since they are substantially similar to apparatus embodiments, reference is made to the description of apparatus embodiments in part. The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements illustrated as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing is merely one specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.