Experiment Analysis of CAN-FD Factors

With the growing number of onboard ECUs, the load of classical CAN (Controller Area Network) is aggravated to produce transmission delay issue. A new protocol CAN-FD (Controller Area Network with Flexible Data-Rate) was presented by the BOSCH company to meet the high speed and real-time data exchange needs of the intelligent vehicles and ITS (Intelligent Transport System). For the vehicle electronics, the CAN-FD data network is still growing up. In this paper, the classical CAN and CAN-FD in protocol are compared through experiments. Results show that: (1) the terminal resistors have more effects on the CAN-FD than the CAN; (2) the bit rate of the CAN-FD can be ten times of that of the CAN; and (3) the data transmission efficiency of the CAN-FD network is affected by both the bit rate and the data length. Additionally, the physical network configuration takes decisive effect on the minimum frame interval of the CAN-FD frame.


A subsection Flexible Data-Rate
The CAN-FD protocol introduces a variable rate technique in the data field, which is a variable rate (up to 10 Mbit/s) before the control field BRS bit to the ACK (Acknowledgement) field (CRC delimiter), as shown in Figure 1. The rest part uses CAN2.0A/B bus speed (up to 1Mbps), and each set has a set of time definition registers.

Data Field
The payload is determined by the DLC in control field and get extended in CAN-FD protocol. DLC in classical CAN is up to 8 and get extended up to 16 in CAN-FD. The payload of the Data Frame is same when the DLC is less or equal to 8. When DLC is larger than 8, the payload of the CAN-FD frame will get a non-linear growth. The relationship between the DLC and payload of data frame is shown in Table  1.

CRC (Cyclic Redundancy Check) Sequence
Two new CRC polynomials are used in CAN-FD CRC due to the introduction of the new data bytes in CAN-FD. The use of CRC polynomial is determined by the length of the payload of the frame and is shown in Table 2. BRS (Bit Rate Switch): Tells whether the bitrate switch is on, The BRS is 1, indicating that the bitrate in data transmission phase is higher than arbitration phase and ACK phase.
ESI (Error State Indicator): The error status indicates is 0 when in active error and 1 when in passive error.

Peer-to-Peer Performance Comparison
The purpose of CAN-FD point-to-point communication experiment is to compare the influence of various parameters on the communication performance of the CAN-FD network on the basic physical layer and visually compare the difference in communication performance between CAN-FD protocol and CAN2.0 protocol under the same physical layer structure. The physical layer structure gap mainly compares the effects of different bus lengths and CAN network matching termination resistance changes on communication performance. The CAN-FD communication performance mainly compares the effect of the variable bit rate on the frame duration of the final CAN-FD frame and the amount of data carried by the actual CAN-FD frame.
In this experiment, the S32K144EVB-Q100X produced by NXP is used as the experimental platform to build the CAN-FD network for related experiments. The S32K144 chip of NXP's S32K144EVB-Q100X has three FlexCAN modules, of which the FlexCAN0 module supports the configuration as CAN-FD protocol and CAN2.0 protocol, FlexCAN1 and FlexCAN2 modules only support the CAN2.0 protocol. The S32K144EVB-Q100X is also equipped with a UJA1169 transceiver, supports CAN-FD protocol and CAN2.0 protocol, and can be configured for FlexCAN0 or FlexCAN1 modules. The maximum bit rate for variable rate support in CAN-FD in the S32K144EVB-Q100X is 5 Mbps.

Bus Physical Length
Considering the vehicle use, this experiment mainly carried out three kinds of bus length experiments, the bus length is 5m (car), 10m (van) and 20m (bus), respectively, under these three bus lengths CAN-FD and CAN2.0 communication experiments, and three different rates of 1Mbit/s, 2Mbit/s and 5Mbit/s are adopted for the CAN-FD variable rate part. The experimental results show that for the vehicle use, CAN2.0 protocol and CAN-FD protocol can communicate normally, and the waveform obtained by measuring and comparing the experiment can also be seen in the vehicle use (with the bus length within 20 meters), the bus length is CAN2.0 and CAN-FD communication waveforms have little effect. CAN_H voltage is 3.36V, CAN_L voltage is 1.56V, and the rise and fall time is 70ns. In automotive applications, the effect of bus length on CAN-FD network configuration can be ignored. The CAN-FD frame wave is shown in Figure 2 when the bitrate of data transmission phase is 5Mbit/s.

Terminating resistor
The CAN bus usually installs a 120Ω termination resistor at each end of the bus to eliminate the signal reflection of the communication process, which is also the specification given by the ISO-11898 protocol. Considering the terminal resistance configuration problem that may occur due to various problems in the actual CAN-FD network, this section will consider the influence of the terminating resistor on CAN-FD network communication in CAN-FD network operation.
The experimental results are shown in Table 3.1. The CAN2.0 network can work normally even if the terminal resistance is not configured on one side. But in CAN-FD network, the improvement of the reflected wave generated by the high-frequency signal at the terminal of the transmission line may interfere with the original signal, resulting in an error in the signal transmission signal after entering the variable bit rate stage, which eventually leads to communication failure.
For the CAN-FD network, when the termination resistance of one end is correctly configured, the other terminal resistance configuration range is 60-150Ω, the CAN-FD network can still work. The differential voltage of CAN_H and CAN_L will increase as the termination resistance increases. The signal rise time and fall time of CAN_H and CAN_L reach the minimum value 70 ns when the termination resistance is correctly matched. The results is shown in Table 3.

Bitrate
The most obvious change brought by the CAN-FD protocol is the addition of a variable rate segment, which increases the bit rate of the variable rate segment of CAN-FD from 25 Kbps to 1 Mbps for conventional CAN2.0 to 25 Kbps to 12 Mbps, greatly improving the communication speed of the CAN-FD network. For the S32K144EVB-Q100X used in this experiment, the maximum communication rate of CAN-FD supported is 5Mbps. This experiment will conduct 1Mbps, 2Mbps and 5Mbps CAN-FD communication experiments and classical CAN2.0 500Kbps communication experiment. The bitrate of the arbitration phase and ACK phase in the CAN-FD frame is 500Kbps, which is convenient for comparison with CAN2.0. The experiment uses the same ID (0xFFF) of the node to send the same frame data (E32554C7, 8bit). The other configurations are identical except for the variable rate segment bit rate. The experimental results are shown in Fig.3 ~ Fig. 4.
The results show that with the increasing bitrate of the variable rate segment, the duration of the CAN-FD frame is greatly reduced. The waveform data segments are compared and compared ( Figure  3). It can be found that at lower bit rates (500kbit/s, 1Mbit/s), the invisible differential levels of CAN_H and CAN_L on the bus little, with CAN_H voltage of 3.48V, CAN_L voltage of 1.44V, and differential voltage of 2.04V. However, when the bitrate is improved (2Mbit/s, 5Mbit/s), the frequency of the communication signal increases as the frequency of the communication signal on the bus increases, and the invisible differential level of CAN_H and CAN_L on the bus increases with the bitrate. The CAN_H voltage is 3.40V, the CAN_L voltage is 1.48V, the differential voltage is 1.92V at 2Mbps, the CAN_H voltage is 3.36V, the CAN_L voltage is 1.56V, the differential voltage is 1.80V at 5Mbps, but the comparison of the rising and falling times are basically the same, both 70ns (Figure 4), which depends mainly on the performance of the actual physical network of CAN-FD.

Minimum frame interval
In the actual operation of the CAN network, there is a certain interval between two adjacent CAN frames to distinguish two different CAN frames. The minimum value of this interval is the minimum frame interval. When designing a CAN-FD network, it is also necessary to consider the minimum frame interval of the CAN-FD network, which affects the operating efficiency of the CAN-FD network. This set of experiments will compare the effects of different transmission rates and different data field lengths on the minimum frame interval of network. Through the experimental results, the minimum frame interval mainly depends on the controller hardware. The CAN protocol and the CAN frame content have little effect on the minimum frame interval. For this experiment, the S32K144EVB-Q100X has a minimum frame interval of about 24 us.

Actual data-transfer Bitrate
The CAN-FD protocol was originally proposed to improve the communication rate of the CAN network. This section mainly experiments on the actual data transmission rate of the CAN-FD network, and compares the improvement with the CAN2.0 protocol in the actual data transmission rate, which can be considered as the amount of data field data transmitted per unit time.
The data frame length supported by CAN2.0 is 0-8 Byte, and the data frame length supported by CAN-FD protocol is 0-64 Byte. Considering that CAN-FD usage scenarios are mostly for large data volume transmission, it will be adopted for CAN2.0 network. 8Byte data frame length, CAN-FD network uses 8-64Byte data frame length, considering the data length transmitted on the CAN-FD network per unit time.
To facilitate a more intuitive comparison of the actual amount of data transmitted in different configurations of the CAN-FD network, an actual data transmission rate probability is introduced in formula (1).
= * (1) T is the total time of a single frame, T is the minimum frame interval, N is the byte of the data field.
The results can be seen in Table 6. By comparing the actual data transmission rates, under the same hardware configuration (the minimum frame interval is the same), by increasing the data field bit rate and the data field length, the amount of data transmitted in the actual unit time of the CAN-FD network can be greatly improved. When the data field rate is 5 Mbps and the data field length is 64 Bytes, the actual transmission rate can reach 10 times of the transmission rate under the condition of CAN2.0 500 Kbps with 8 Bytes, which greatly improves the transmission efficiency of the CAN bus.

Conclusion
A comparison of protocol performance between the classical CAN and the flexible data CAN (CAN-FD) is made through experiments. Some factors including the terminal resistors, the wire length, the bit rate, and the load rate are evaluated for the CAN-FD performance. Some results are validated. Firstly, the wire length has little influence on the CAN-FD network performance in vehicles. Secondly, the CAN-FD is more sensitive to the terminate resistors than the classical CAN due to the higher bit rate. Thirdly, the bit rate of the CAN-FD network can be at least 10 times of that of the classical CAN. Fourthly, both the bit rate and the data length can take effects on the data transmission efficiency of the CAN-FD network. Finally, the minimum frame interval is determined by the physical network configuration.