Vehicle Network Communication Protocols — Comparison and Case Study
Total Page:16
File Type:pdf, Size:1020Kb
http://www.paper.edu.cn Vehicle Network Communication Protocols — Comparison and Case Study LIU Heng1 AN Jian-ping1 YANG Jie1 (1.Dept. of E.E. Beijing Institute of Technology, Beijing, 100081) Abstract: In-vehicle networking is a method for transferring data among distributed electronic modules via a serial data bus. The classification of In-vehicle networks was introduced in this article and communication protocols such as LIN, CAN, VAN, J1850, and J1939 etc. were compared. There was a case study on character and performances of CAN protocol which is widely used in automotive industry and automation. The simulation results showed the error handling mechanism and bus load feature of CAN network. Layered-architecture of vehicle networks and protocols was explained considering communication requirement. The future trend of vehicle network communication protocols was also discussed. Keywords: in-vehicle networking; communication protocol; CAN; performance evaluation Introduction networking. Many standards such as LIN, VAN, CAN, More and more electronic control units(ECUs) have SAE J1850 and TTP have been developed. been equipped in vehicles and the interaction between 1. Vehicle Network and Communication these subsystems has increased the need for real-time Protocols communications within a vehicle. Using more dedicated 1.1 SAE Classification signal wires was impossible because of cost, reliability SAE Vehicle Network for Multiplexing and Data and repair problems. In-vehicle networking, also known Communications Committee has defined three basic as multiplexing, is a method to solve this problem. This categories of in-vehicle networks based on network can decrease dedicated wires required for each function, speed and functions: and reduces the size of the wiring harness. System cost, • Class A Low Speed (<10kb/s); Convenience weight, reliability, serviceability, and installation can be features (entertainment, audio, trip computer, improved. Common sensor data, such as vehicle speed, etc.) engine temperature, etc. are available on the network, so • Class B Medium Speed (10kb/s to 125kb/s); data can be shared, thus eliminating the need for General information transfer (instrument redundant sensors. Networking allows vehicles content cluster, vehicle speed, legislated emissions data, flexibility because functions can be added through etc.) software changes. • Class C High Speed (125kb/s to 1M b/s or Automotive manufacturers and various automotive greater); Real-time control (powertrain control, industry standards organizations have been working for vehicle dynamics, brake by wire, etc.) many years to develop standards for in-vehicle Some protocols with higher speed (>1M b/s), may be defined as Class D, they are applied to more strictly 转载 中国科技论文在线 http://www.paper.edu.cn real-time control and multimedia system. LIN brings advantages of cost, flexibility, re-use and 1.1.1Class A Multiplexing logistics. Class A multiplexing is most applied to inexpensive, 1.1.2 Class B Multiplexing low-speed body wiring and control functions. Class A The Class B data network is the main driving force protocols are various such as UART, Sine bus, LIN, for module integration and service diagnostics. The CCD, ACP,BEAN, and SAEJ1708/J1587/J1922. LIN is Class B network is applicable for the control processing widely used among them, while TTP/A also gives a that has low requirement of real-time. There are some solution. Table 1 is a comparison between LIN and protocols such as GMLAN(SWC), ISO11898-3, TTP/A[6,7]. ISO11519-2, VAN, J1850, etc. Most of the vehicle Table1 LIN and TTP/A manufacturers are using J1850 in the United States and CAN in Europe for the Class B network. Table 2 gives a Characters LIN TTP/A Functions Sensor, Sensor, Actuator comparison among CAN, SAEJ1850 and VAN[4,5]. Actuator Medium Single wire Single wire, 1.1.3 Class C Multiplexing Twisted pair, Network standards such as CAN 2.0, SAEJ2284, Optical fiber Bit Encoding NRZ NRZ SAEJ1939, ABUS are used in Class C network. The Media Access Master-slave TDMA Error Detection CRC CRC predominant Class C protocol is CAN 2.0. The CAN Data Length 8 bytes No define protocol is targeted at high-speed, real-time control and Data Rate 20kbps >1Mbps Financial Cost Low Low can operate at up to 1 Mb/s. In the US, CAN acceptance A LIN sub-bus system uses a single-wire is growing. The SAE Truck and Bus Control and implementation (enhanced ISO9141), which can Communications subcommittee selected CAN in 1994 significantly reduce manufacturing and component as the basis for J1939, the class C network for truck and costs. Self-synchronization, without crystal resonator, in bus applications. Table 3 is the comparison of CAN2.0, the slave node also reduces component cost. The system SAEJ2284 and SAEJ1939. is based on common UART/SCI interface hardware that is shared by most microcontrollers. Table 2 CAN, SAEJ1850 and VAN Characters CAN VAN SAEJ1850 ISO11898 ISO11519-2 ISO11519-3 ISO11519-4 Functions Control, Diagnose Control, Diagnose General use, Diagnose Message ID 11bits or 29bits 12bits 7bits or 8bits RTR Support Support Support Data Field Length 0-8 bytes 0-28 bytes 0-8 bytes CRC 15bits 15bits 8bits Message Priority Support Support Support Overlord Control Support No No Medium Twisted pair Twisted pair Single wire(VPW) Twisted pair(PWM) Bit Encoding NRZ Manchester VPW PWM Synchronization Bit Synchronization Bit Synchronization No Network Topology Bus Bus/Tree/Star/Ring Bus Data Rate 10kbps~1Mbps 125kbps 10.4kbps(VPW) 41.6kbps(PWM) 中国科技论文在线 http://www.paper.edu.cn Table 3 CAN2.0, SAEJ2284 and SAEJ1939 classified into two kinds: by measurement or by Characters CAN2.0 SAEJ2284 SAEJ1939 modeling and simulation. There are three methods in Functions Control, Control, Control, common use to model and analyze: mathematics Diagnose Diagnose Diagnose Medium Twisted pair Twisted pair Twisted pair simulation, hardware in loop simulation and test in Bit Encoding NRZ NRZ NRZ existence. These methods are introduced to analysis of Media Access Contention Contention Contention vehicle network protocols. To build the object-oriented Error CRC CRC CRC Detection models and to simulation by the software could give Message ID 11bits or 29bits 11bits or 29bits 29bits theoretical proofs. It is commonly used during the Data Length 0-8 bytes 0-8 bytes 8 bytes development and is very efficient. For example, the Data Rate 1Mbps 500kbps 250kbps network simulation tool OPNET Modeler is used to Bus Length 40m(typical) 30m 40m Max Numbers 32 16 30(STP); simulate J1850 and CAN network[10,11]; the of Nodes 10(UTP) performance evaluation of CAN and Advanced Besides above, table 4 gives some characters of PALMNET via discrete event simulation[9]. multimedia system protocols which are used now. Of course some special tools are used to analyze IEEE1394 uses the advanced packet switch data relevant protocols such as LINalyzer[6], CANoe (CAN communication method. The maximum data transfer Open Environment), CANalyzer/CANoe Option J1939, rate is 400Mbps. It can contain more channels for CANalyzer/CANoe Option LIN, CANalyzer/CANoe multimedia communication. Option MOST, etc. The standards of vehicle network MOST(Media Oriented Systems Transport), with the protocols performance evaluation are as follows: lower financial cost, has been accepted by most y Transferring ability automotive manufactures in Europe. The data rate of it It is one of the most important aspects to evaluate a is 24.8Mbps, which can support the multimedia protocol. Transferring ability may be represented by the applications to common vehicles by now. total message capacity, which is primarily decided by Table 4 D2B, MOST and IEEE1394 data field length. The performance factors such as Characters D2B MOST IEEE1394 throughput can be analyzed. y Efficient data rate. Functions Audio/Vid Multimedia High speed eo signal signal Multimedia signal It is indicated by the ratio of message identification length to data field length in a frame. For example, the Medium Optical Optical Optical fiber/UTP5 fiber fiber data field of CAN and Basic CAN varies from 1 byte to Bit Encoding PWM Dual-phase NRZ , Media Access Contention CSMA Contention 8 bytes its available data rate varies from 38% to Error Detection CRC CRC CRC 78%[9]. Frame Length 480bits 512bits Data Rate 12Mbps 24.8Mbps 100/200/400Mbps y Reliability Financial Cost Middle Middle High How to ensure the correctness of data communication and how to find the error quickly when 2. Performance Evaluation something is wrong in the system are considered. The The methods of performance evaluation are 中国科技论文在线 http://www.paper.edu.cn performance factors such as the probability of a is of great importance for the performance of a CAN transmission failure can be analyzed. system. Each node maintains two error counters: the y System delay Transmit Error Counter (TEC) and the Receive Error System delay is the time interval from the instant Counter (REC). A transmitter detecting a fault will when a message is generated to the instant when the increment its TEC faster than the listening nodes will message’s last bit is transmitted. The higher traffic increment their REC. When any Error Counter raises causes the longer transmission time, which implies that over a certain value, the node will from first become other frames have to wait in queue. The communication "error passive", that is, it will not actively destroy the protocol must satisfy the demand of average system bus traffic when it detects an error, and then "bus off", delay. which means that the node doesn't participate in the bus Others performance such as System coverage, traffic at all. Figure 1 shows the error counters of nodes Flexibility, Extend ability, Hardware load also need to with CAN controller in a bus network, which is be considered [2]. simulated by OPNET Modeler[11]. 3. Case Study -CAN Protocol CAN protocol is documented in ISO 11898 (for high-speed applications) and ISO 11519 (for lower-speed applications) and as such compliant with the ISO layer model.