How to handle errors in CAN bus of new energy vehicles?

Abstract: This paper introduces the impact of CAN bus shutdown on the function and safety performance of new energy vehicles, and puts forward some reasonable suggestions.

On October 26, 2019, the 3rd China (Foshan) Hydrogen Energy Conference demonstrated the hydrogen fuel cell city bus, which appeared as a new driving form compared with the current pure electric vehicles and traditional vehicles. However, the realization of the whole vehicle network of new energy vehicles is still inseparable from CAN bus communication.

Engineers can control many ECU units on the vehicle by reading the vehicle speed, rotational speed and other signals through the CAN bus. However, do you know what impact the shutdown of the CAN bus will have on the functions of new energy vehicles? This article will do a detailed analysis.

1. Why can the CAN bus still play an important role in new energy vehicles?

Friends in the automotive-related industry all know CAN bus, which is the bus standard for communication between Electronic control units in today’s automobiles. Now almost all automobile manufacturers choose to use CAN bus communication. The CAN bus was originally born on the basis of the BOSCH company in order to solve many problems such as the contradiction of wiring space caused by the increase of electronic control units in automobiles and the increase in weight of automobiles. At the same time, the CAN bus connects the electronic control units inside the car into a local area network, which realizes the sharing of information and greatly reduces the wiring harness of the car, as shown in Figure 1:

How to handle errors in CAN bus of new energy vehicles?

Figure 1 Vehicle network

Compared with the currently popular Ethernet and 485 buses, the CAN bus has the following characteristics:

l Bus access – non-destructive arbitration of carrier sense, multiple access, collision avoidance;

l Multi-host broadcast structure, automatic priority arbitration, strong real-time performance;

l Automatic retransmission of transmission errors, automatic CRC check reception, extremely low data error rate;

l Differential signal transmission has strong anti-interference ability, which is suitable for the environment with strong interference inside the car;

l The hardware packet filtering function reduces the burden on the CPU.

Based on the above characteristics, the CAN bus can ensure real-time and reliable data transmission, and ensure the normal communication of the vehicle network, and has an irreplaceable position in the new energy vehicle industry.

2. What is CAN bus shutdown?

There are many ECU nodes in the car. When one of the nodes fails and enters the bus off state, it will greatly affect the communication of the entire vehicle CAN network. For example, when the car collides, the sensor transmits the electrical signal to the airbag ECU, and the signal is processed. When it is determined that the airbag needs to be opened, the ECU will immediately send an ignition signal, and the gas generator will fill the airbag. Passengers are provided with safety protection, as shown in Figure 2. If the airbag ECU is in the bus-off state at this time, the airbag cannot be ejected normally, which will lead to serious consequences.

How to handle errors in CAN bus of new energy vehicles?

Figure 2 Schematic diagram of the working of the airbag ECU

So, what is a CAN bus shutdown?

The CAN controller can determine whether the type of error is a temporary data error on the bus (such as external interference, etc.) or a persistent data error (such as internal unit failure, driver failure, wire break, short circuit, etc.). Therefore, when a continuous data error occurs on the bus, the error counter inside the CAN controller accumulates to the bus shutdown threshold, which can isolate the unit that caused the fault from the bus and does not participate in the network communication with other nodes on the bus. As shown in Figure 3:

How to handle errors in CAN bus of new energy vehicles?

Figure 3 Error detection mechanism

3. Analysis of the causes of CAN bus shutdown

Most of the causes of errors are caused by physical faults, mainly from CAN lines. These include: CAN_H open circuit, CAN_L open circuit, CAN_H to CAN_L short circuit/open circuit, CAN_L to VBAT short circuit, CAN_H to GND short circuit, CAN_L to GND short circuit, terminal resistance open circuit, etc.

In addition to physical layer line factors, it may also be caused by the failure of components such as CAN controllers or transceivers. At the same time, it is also possible that the CAN signal is not sent and received correctly due to the interference of the CAN bus signal. In severe cases, the message cannot be sent normally, which makes the CAN bus more likely to be closed.

For example, new energy vehicles usually refer to pure electric vehicles or hybrid vehicles, which are characterized by the use of batteries and capacitors to store capacity, which are then converted into AC through inverters to drive electric motors to drive vehicles. The huge current generated by the inverter forms strong interference, which crosstalks to the CAN bus, causing the controller to crash, damage or interrupt communication, and the vehicle runs erratically.

4. How to recover from CAN bus shutdown?

If BUS OFF occurs, the nodes on the bus need to take some actions, such as restarting the CAN controller or powering on again, but these are only some remedial measures. The most fundamental thing is to find the root cause of BUS OFF.

When the CAN bus is turned off, we can check the value of the BUS OFF register and initialize the driver of the CAN controller and related registers. After initialization is complete, the CAN bus shutdown fault is immediately removed. In order to prevent the node from frequently shutting down the bus in the CAN network, it is recommended not to send CAN messages immediately after initialization.

As mentioned above, due to strong interference inside the car, the CAN bus will also be turned off. In response to this phenomenon, we deal with it in the following ways:

l Due to the space magnetic interference caused by the strong current inside the car, the twisted pair of the CAN cable should be increased;

lCAN interface design adopts CTM1051 isolation transceiver and isolation limiter to prevent ECU from crashing;

l CAN interface adds magnetic ring, common mode Inductor and other effective inductive protection devices;

l External special signal protector to eliminate interference, such as ZF-12Y2;

l Use the bridge relay device CANBridge to isolate some strong interference sources.

Based on the above, when the car CAN bus is turned off, the external factors such as the physical layer, including CAN lines, CAN controllers and transceivers, and CAN signal interference should be analyzed, and the CAN registers and software processing should be analyzed at the same time. After re-initializing the CAN driver and returning to normal , and periodically try to send outgoing packets.

Five, CAN network black box – CANDTU

When the new energy vehicle sends the bus off, we also hope to have corresponding CAN messages to analyze, especially for occasional failures, we need reliable CAN messages as the basis for judgment.

Guangzhou Zhiyuan Electronics Co., Ltd. has launched a CAN network bus “black box”, which we call CANDTU. As shown in Figure 4, CANDTU integrates 2 or 4 independent CAN-bus channels conforming to the ISO11898 standard, and the standard storage medium is 32G high-speed SD card, which can perform long-time recording, conditional recording, pre-triggered recording and timing recording and other modes, and can convert the recorded data into CSV format, or CANOE, CANScope and other mainstream analysis software formats for later use Process analysis.

Figure 4 Schematic diagram of CANDTU series products

CANDTU can record CAN messages for a long time to facilitate engineers to find data, but it cannot locate and analyze network stability and sporadic failures.

The Links:   2SB1202T-E CM100DY-24NF