Share this

Features and Applications of CAN Bus

2026-04-06 07:28:46 · · #1
This abstract introduces the development history of the CAN bus, describes its characteristics and main technical indicators, and finally presents an application example of the CAN bus in high-speed trains. Keywords: CAN bus, Controller Area Network, Industrial Control System, High-Speed ​​Train 1. Introduction CAN (Controller Area Network) is a fully digital, multi-master, and bidirectional fieldbus. The CAN bus is a multi-master local area network pioneered by Bosch for modern automotive applications. Due to its superior performance, it is now widely used in industrial automation, various control equipment, transportation vehicles, medical instruments, and numerous sectors such as construction and environmental control. Controller Area Networks will be rapidly popularized and promoted in China. With the rapid development of computer hardware, software technology, and integrated circuit technology, industrial control systems have become one of the most dynamic branches in the application of computer technology and have made great progress. Due to the high requirements for system reliability and flexibility, the development of industrial control systems is mainly characterized by: diversified control and decentralized systems—distributed load, distributed functions, distributed hazards, and geographically distributed systems. Distributed industrial control systems have been developed to meet these needs. Distributed industrial control systems (DICS) are products that tightly integrate 5C technologies—Computer, Control, Communication, CRT (Display Technology), and Conversion—with microcomputers at their core. They offer significant advantages over distributed instrumentation control systems and centralized computer control systems in terms of adaptability, scalability, maintainability, and fault tolerance. A typical DICS consists of field devices, interface and computing devices, and communication devices. Fieldbus can simultaneously meet the needs of process control and manufacturing automation, making it one of the most active areas in the industrial data bus field. Research and application of fieldbus have become a hot topic in the industrial data bus field. Although a perfect standard for fieldbus has not yet been proposed, its high performance-price ratio will attract many industrial control systems to adopt it. Furthermore, the lack of a unified standard for fieldbus allows for diverse applications and will provide richer evidence for its improvement. Controller Local Area Network (CAN) emerged in this context. As CAN is increasingly adopted and promoted in various fields, there is a growing demand for standardization of communication messages across different applications. To address this, in September 1991, PHILIPS SEMICON-DUCTORS developed and released the CAN technical specification (VERSION 2.0). This specification consists of two parts, A and B. 2.0A defines the CAN message format previously defined in CAN technical specification version 1.2, while 2.0B provides both standard and extended message formats. Subsequently, in November 1993, ISO officially issued the international standard for Road Transport Vehicles—Digital Information Interchange—High-Speed ​​Communication Controller Local Area Network (CAN) (ISO 11898), paving the way for the standardization and promotion of Controller Local Area Networks. 2. Characteristics of the CAN Bus The CAN bus is a serial data communication protocol developed by Bosch in Germany in the early 1980s to solve the data exchange problem among numerous control and testing instruments in modern automobiles. It is a multi-master bus, and the communication medium can be twisted pair, coaxial cable, or optical fiber. The communication rate can reach 1 Mbps. The CAN bus communication interface integrates the physical layer and data link layer functions of the CAN protocol, enabling framing of communication data, including bit stuffing, data block encoding, cyclic redundancy check, and priority determination. A key feature of the CAN protocol is the elimination of traditional station address encoding, replacing it with encoding communication data blocks. This method theoretically allows for an unlimited number of nodes in the network. The data block identifier can consist of 11 or 29 bits, thus allowing for the definition of 211 or 229 different data blocks. This block-based encoding also enables different nodes to receive the same data simultaneously, which is extremely useful in distributed control systems. The maximum data segment length is 8 bytes, meeting the general requirements of control commands, operating status, and test data in industrial applications. Furthermore, 8 bytes do not consume excessive bus time, ensuring real-time communication. The CAN protocol employs CRC (Cyclic Redundancy Check) verification and provides corresponding error handling functions, guaranteeing the reliability of data communication. CAN's superior characteristics, high reliability, and unique design make it particularly suitable for interconnecting industrial process monitoring equipment. Therefore, it is increasingly valued by the industry and is widely recognized as one of the most promising fieldbuses. Furthermore, the CAN bus adopts a multi-master contention bus structure, featuring multi-master operation, distributed arbitration, and broadcast communication characteristics. Any node on the CAN bus can actively send information to other nodes on the network at any time without hierarchy, thus enabling free communication between nodes. The CAN bus protocol has been certified by the International Organization for Standardization (ISO), the technology is relatively mature, and the control chips are commercially available, offering high cost-effectiveness, making it particularly suitable for data communication between distributed measurement and control systems. CAN bus cards can be freely plugged into PC ATXT compatible machines, easily forming distributed monitoring systems. 3 CAN Bus Technology 3.1 Bit Arbitration Real-time data processing requires rapid data transmission, necessitating a high-speed physical data transmission path. When several stations need to send data simultaneously, rapid bus allocation is required. Real-time processing differs significantly from urgent data exchanged over a network. A rapidly changing physical quantity, such as a car engine load, will transmit data more frequently and require shorter latency than a relatively slowly changing physical quantity like a car engine temperature. The CAN bus transmits data in units of messages, with message priority combined in an 11-bit identifier. The identifier with the lowest binary number has the highest priority. This priority cannot be changed once established during system design. Conflicts during bus reads are resolved through bit arbitration. For example, when several stations send messages simultaneously, station 1's message identifier is 0111111; station 2's message identifier is 0100110; and station 3's message identifier is 0100111. All identifiers have the same two 01 bits. When comparing the third bit, station 1's message is dropped because its third bit is high, while the third bit of the other two stations' messages is low. Station 2 and station 3's messages have the same bits 4, 5, and 6, and station 3's message is not dropped until the seventh bit. Note that the signals on the bus continuously track the message of the station that last gained bus read rights. In this example, the message of station 2 is tracked. The advantage of this non-destructive bit arbitration method is that the beginning of the message has already been transmitted on the network before the network finally determines which station's message will be transmitted. All stations that have not gained bus read rights become the receiving stations of the highest priority messages and will not send messages before the bus is idle again. CAN is highly efficient because the bus is only used by those stations that have requested bus reads pending, and these requests are processed sequentially according to the importance of the messages in the entire system. This method has many advantages when the network is heavily loaded because the priority of bus reads is placed sequentially in each message, which can guarantee low individual latency in real-time systems. For the reliability of the master station, since the CAN protocol implements decentralized bus control, all major communications, including bus read (grant) control, are completed in several parts in the system. This is the only way to achieve a highly reliable communication system. 3.2 Comparison of CAN with Other Communication Schemes In practice, there are two important bus allocation methods: scheduled allocation and demand-based allocation. In the first method, each node is allocated a bus for the maximum duration, regardless of whether it requests the bus. This ensures that the bus is allocated to each station, and uniquely assigned, regardless of whether the access is immediate or at a specific time, guaranteeing a clear bus allocation during access. In the second method, the bus is allocated to a station based on the basic requirements for data transmission, with the bus system allocating according to the station's desired transmission (e.g., Ethernet CSMA/CD). Therefore, when multiple stations request bus access simultaneously, the bus will terminate all requests, and no station will receive a bus allocation. More than one bus access is necessary for bus allocation. CAN's bus allocation method guarantees explicit bus allocation when different stations request bus access. This bit arbitration method resolves collisions that occur when two stations transmit data simultaneously. Unlike message arbitration in Ethernet networks, CAN's non-destructive method of resolving bus access conflicts ensures that the bus is not occupied when not transmitting useful messages. Even under heavy bus load, the message content-priority bus access has proven to be an effective system. Although the bus's transmission capacity is insufficient, all unresolved transmission requests are processed in order of importance. In networks like CSMA/CD, such as Ethernet, the system often crashes due to overload, but this does not happen in CAN. 3.3 CAN Message Format Each data frame transmitted on the bus consists of seven different bit fields: Start of Frame (SOF), Arbitration Field, Control Field, Data Field, Cyclic Redundancy Check (CRC), Acknowledgment (ACK), and End of Frame. The CAN protocol supports two different message formats, the only difference being the identifier (ID) length: 11 bits for the standard format and 29 bits for the extended format. In the standard format, the start bit of the message is called the Start of Frame (SOF). It marks the start of data frames and remote frames, consisting of only one dominant bit. A station is only allowed to begin transmitting when the bus is idle, and all stations must be synchronized with the SOF leading edge of the station that first begins transmitting. Next is the arbitration field, consisting of a 11-bit identifier and a Remote Transmission Request (RTR) bit. The RTR bit indicates whether it is a data frame or a request frame; request frames do not contain data bytes. The control field includes the Identifier Extension (IDE), indicating whether it is a standard or extended format. It consists of 6 bits: the first two bits are reserved for future expansion; the last four bits specify the length of the data in the data field (DLC). The data field ranges from 0 to 8 bytes, with each byte consisting of 8 bits. The Cyclic Redundancy Check (CRC) field includes the CRC sequence followed by the CRC delimiter. The acknowledgment field is 2 bits, including the acknowledgment gap and acknowledgment separator. The transmitting station sends two recessive levels (logic 1), and the receiving station that correctly received the message sends a master control level (logic 0) to cover it. In this way, the transmitting station can ensure that at least one station in the network can correctly receive the message. The end of the message is marked by the end of the frame. There is a short interval bit between two adjacent messages; if no station accesses the bus during this interval, the bus will be idle. 3.4 Data Error Detection Unlike other buses, the CAN protocol cannot use acknowledgment information. In fact, it can signal any error that occurs. The CAN protocol can use five error checking methods, the first three of which are based on message content. 3.4.1 Cyclic Redundancy Check (CRC) Adding redundancy check bits to a message frame ensures message correctness. The receiving station can determine whether the message is erroneous using CRC. 3.4.2 Frame Check This method determines the correctness of the message by checking the format and size of the frame in the bit field, and is used to check for format errors. 3.4.3 Acknowledgment Error As mentioned above, the received frame is acknowledged by the receiving station with an explicit acknowledgment. If the sending station does not receive an acknowledgment, it indicates that the receiving station has detected an error in the frame, meaning the ACK field is corrupted or no station in the network is receiving the message. The CAN protocol can also detect errors through bit checking. 3.4.4 Bus Detection Sometimes, a node in the CAN can monitor its own transmitted signals. Therefore, the station sending the message can observe the bus level and detect the difference between the transmitted and received bits. 3.4.5 Bit Stuffing Each bit in a frame of messages is represented by non-return-to-zero code, ensuring maximum efficiency of bit encoding. However, if there are too many bits with the same level in a frame of messages, synchronization may be lost. To ensure synchronization, synchronization is generated using bit stuffing. After five consecutive equal bits, the sending station automatically inserts a complementary two's complement bit; this stuffing bit is automatically discarded upon reception. For example, after five consecutive low-level bits, CAN automatically inserts a high-level bit. CAN checks for errors using this encoding rule; if there are six identical bits in a frame of messages, CAN knows an error has occurred. If at least one station detects one or more errors using the above method, it will send an error flag to terminate the current transmission. This prevents other stations from receiving erroneous messages and ensures message consistency on the network. When a large amount of data transmission is terminated, the transmitting station will automatically retransmit the data. As a rule, transmission will resume within 23 bit cycles after an error is detected. In special cases, the system recovery time is 31 bit cycles. However, this method has a problem: a station that malfunctions will cause all data to be terminated, including correct data. Therefore, without self-monitoring measures, the bus system should adopt a modular design. To this end, the CAN protocol provides a method to distinguish between accidental errors and permanent errors and local station failures. This method can be achieved by statistically evaluating the faulty station to determine the error of the station itself and entering an operating method that will not adversely affect other stations. That is, the station can prevent normal data from being terminated due to being mistakenly treated as incorrect data by shutting itself down. 3.5 CAN Reliability 3.5.1 Security To prevent unnecessary consequences caused by data exchange errors during the lifespan of the CAN bus, high data transmission security is required. This goal is not difficult to achieve if the reliability of data transmission is high enough, or the residual data error is low enough. From the perspective of bus system data, reliability can be understood as the ability to identify data errors generated during transmission. The probability of residual data errors can be obtained through statistical measurements of data transmission reliability. It describes the probability that transmitted data is corrupted and that such corruption cannot be detected. The probability of residual data errors must be very small, making it almost undetectable on average throughout the system's entire lifespan. Calculating the residual error probability requires the ability to classify data errors, and the data transmission path must be descriptive by a model. To determine the residual error probability of CAN, it can be considered as a function of the bit error probability when transmitting a message with 80-90 bits. Assuming there are 5-10 stations in the system and an error rate of 1/1000, the maximum bit error probability is on the order of 10-13. For example, if the maximum data transmission rate of a CAN network is 1 Mbps, and only 50% of the data transmission capacity is used, then for a system with a 4000-hour operating life and an average message length of 80 bits, the total amount of data transmitted is 9 × 10¹⁰. During the system's operational lifespan, the statistical average of undetectable transmission errors is less than the order of 10-2. In other words, assuming a system operates 365 days a year, 8 hours a day, and an error rate of 0.7 per second, then statistically, an undetectable error would occur only once every 1000 years. 3.5.2 Correctness and Integrity The CAN bus was initially designed for the automotive industry. For this market to accept it, a communication protocol capable of efficiently handling errors was crucial. After the release of the CAN bus specification version 2.0B, its maximum communication rate was increased eightfold compared to version 1.2, reaching 1 Mbit/s. At this rate, even time-critical parameters can be transmitted via the CAN bus without worrying about latency. Furthermore, the CAN bus protocol has a complete set of error definitions that can automatically detect these errors, thereby ensuring the correctness and integrity of the transmitted information. Each node on the CAN bus has the ability to detect various communication errors and take corresponding countermeasures: errors can be detected by "CRC error"; ordinary reception errors can be detected by "acknowledgment error"; CAN message format errors can be detected by "format error"; CAN bus signal errors can be detected by "bit error"; and synchronization and timing errors can be detected by "blocking error". Each node on the CAN bus has an error counter to record the number of times various errors occur. Depending on the severity of the error, these counters can determine whether these nodes should operate in degraded mode; nodes on the bus can degrade from normal operating mode (normal data transmission and reception and error messages) to passive operating mode (only gaining control when the bus is idle), or to shutdown mode (isolated from the bus). Each node on the CAN bus also has the ability to monitor whether the interference is short-term or permanent and take corresponding countermeasures. This matching resistor characteristic is called "fault delimitation isolation". After taking this fault delimitation isolation measure, the faulty node will be shut down in time and will not permanently occupy the bus. This is crucial for the unimpeded transmission of critical information on the bus. 4 Application of CAN bus on high-speed trains The diagnostic system of a certain type of high-speed train uses CAN as a means of networking various electronic controllers. In order to improve the reliability of the system, each car has 4 CAN buses, two on the left and two on the right. The maximum length of each CAN bus is 80m, and the minimum data transmission rate of the CAN bus is 125kb/s. The components to be diagnosed on the vehicle are divided into 4 groups, which are connected to 4 different CAN bus segments to avoid affecting the diagnostic functions of all components due to CAN bus failure. In the on-board diagnostic system, the various devices on the vehicle are connected through the CAN bus. Each vehicle has a vehicle diagnostic computer with 4 CAN bus I/O interface cards, which are connected to the 4 CAN buses respectively. The functional components of each vehicle collect the status signals in the components through the signal acquisition device in the component, and transmit these signals to the vehicle diagnostic computer of the vehicle through the twisted shielded CAN bus. Its structure is shown in Figure 1. [align=center] Figure 1 Schematic diagram of CAN bus of on-board diagnostic system[/align] References [1] Feng Jun. A new type of bus system CAN [2] Wu Kuanming. CAN Bus Principles and Application System Design. Beijing University of Aeronautics and Astronautics Press, 1996 [3] Rao Yuntao, Zou Jijun, Zheng Yongyun. Fieldbus CAN Principles and Application Technology. Beijing University of Aeronautics and Astronautics Press, 2003.
Read next

CATDOLL 115CM Kiki TPE

Height: 115cm Weight: 19.5kg Shoulder Width: 29cm Bust/Waist/Hip: 57/53/64cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22