Share this

Research on Several Issues of CAN in Bus Network Control System Design

2026-04-06 07:38:26 · · #1
Abstract: Network control is the trend of bus technology development. In the process of designing the bus network control system, it is necessary to study some key issues of the system layer and node layer to help improve the performance of network control. This paper analyzes the relevant concepts of the local area network CAN, such as CAN protocol, frame format, and CAN controller operation mode; studies the selection of frame format, identifier allocation, network structure and real-time performance related to system structure design, and provides general analysis methods and principles; analyzes the selection of communication devices and transmission media in node hardware design, and discusses the implementation of control strategy in software design. Keywords: bus; CAN; network control 1 Analysis of relevant concepts 1.1 CAN1.2 and CAN2.0 CAN1.2 and CAN2.0[1] are two different versions of CAN technical specifications. CAN2.0 is compatible with CAN1.2. 1.2 CAN2.0A and CAN2.0B CAN2.0 includes part A and part B, namely CAN2.0A and CAN2.0B. CAN2.0A is a specification of the CAN message format defined according to the CAN1.2 specification, stipulating that the CAN controller must have an 11-bit identifier; CAN2.0B is a specification of the standard and extended formats of CAN messages, and the identifier length of the CAN controller can be 11 bits or 29 bits. CAN controllers conforming to the CAN2.0B protocol can send and receive standard frames with 11-bit identifiers or extended frames with 29-bit identifiers. If CAN2.0B is disabled, the CAN controller can only send and receive standard frames with 11-bit identifiers, ignoring the extended format message structure, but no errors will occur. 1.3 Standard Frames and Extended Frames CAN2.0B has two different frame formats, the difference being the length of the arbitration field: frames with 11-bit identifiers are standard frames, and frames with 29-bit identifiers are extended frames, as shown in Figure 1. Theoretically, a standard frame can identify a maximum of 2^11 (2048) data types. Since the protocol stipulates that the highest 7 bits of the identifier cannot all be recessive bits simultaneously, it can identify a maximum of 2^11-24 (2032) data types. Extended frames use 29-bit identifiers, capable of identifying up to 500 million data types. Figure 1 shows the CAN standard frame and extended frame formats. 1.4 BasicCAN and PeliCAN BasicCAN and PeliCAN are two different operating modes of independent CAN controllers manufactured by Philips. BasicCAN mode is the default operating mode after power-on, capable of transmitting messages in standard frame format. PeliCAN mode is a newer operating mode that can handle all frame types (standard frames/extended frames) of the CAN 2.0B specification, and also has some enhanced functions supporting error analysis. In the CAN controller, the register configuration and parameter setting methods are also different for different operating modes. 2 Main Factors Affecting Network System Design 2.1 Selection of Standard Frames and Extended Frames When transmitting messages using CAN 2.0B, it is necessary to select between standard frames and extended frames. From the perspective of latency, it is used to represent the network response speed; the lower the latency, the faster the response and the better the performance. The highest bit rate of CAN can reach 1Mbps, at which point the transmission time of each bit is 1μs. The standard format message that wins the bus contention, without interruption, has a bus access time of only 111 μs for its maximum length, increasing to 134 μs with padding bits; the extended frame format's maximum length message has a bus access time of 131 μs, increasing to 159 μs with padding bits. From a bus throughput perspective, it is numerically equal to the total amount of information successfully transmitted by the network or channel per unit time, measured in bps. The standard format information frame is 47 + 8 * DLC in length, with the data field accounting for (8 * DLC) / (47 + 8 * DLC) of a frame. At a bit rate of 1 Mbps, the bus throughput is (8 * DLC) / (47 + 8 * DLC) * 1 Mbps. The extended format information frame is 67 + 8 * DLC in length, with the data field accounting for (8 * DLC) / (67 + 8 * DLC) of a frame. At a bit rate of 1 Mbps, the bus throughput is (8 * DLC) / (67 + 8 * DLC) * 1 Mbps. When the data field length is 8 bytes, without considering padding bits, the bus throughput of the standard frame is 577Kbps, while that of the extended frame is 488Kbps. From the above analysis, it is clear that although the extended frame format can represent far more data types than the standard frame format, the standard frame format is significantly superior in terms of bus access time and bus throughput. Therefore, the standard frame format should be used if the node quantity requirement is met. 2.2 Identifier Allocation CAN only provides protocols related to the physical layer and data link layer, and does not define application layer content specific to any particular application. Therefore, defining detailed identifier allocation and network configuration management methods based on the bus protocol, according to the characteristics of the specific application, is a prerequisite for developing a CAN-based bus network control system. Identifier allocation can be implemented in two ways: user-defined and using higher-level CAN protocol standards such as SAE J1939 and CANOpen. Regardless of the method used, it is essential to ensure that high-real-time information related to safety receives high priority. For example, in SAE J1939, the information priority order is control parameters, drive status parameters, drive system control, drive system configuration parameters, information parameters, and information status parameters. 2.3 Network Structure Design With the increasing number of electronic control units in buses and the varying requirements for information communication performance, single-bus network structures suffer from problems such as high network communication load, low communication efficiency, poor real-time performance, and a prominent contradiction between communication distance and network performance. Therefore, a multi-segment structure is generally used to construct a CAN-based bus network control system. A multi-segment structure is suitable for connecting relatively independent network segments, with information exchange achieved through gateways. Its characteristics are: nodes within the same segment are connected via a bus; different segments are connected through gateways and can communicate with each other; network management and centralized control functions are implemented by the gateway. For example, a low-speed bus can be used to connect body control units with low real-time requirements to increase communication transmission distance and improve anti-interference capabilities; a high-speed bus can be used to connect the powertrain system to meet the high real-time requirements related to driving safety; and a microprocessor with a dual-channel CAN controller can be used to implement communication and control functions for information from two CAN buses. 2.4 Network Real-Time Analysis The bus network control system is a distributed real-time system. Many tasks have strict real-time and hard real-time requirements, and information transmission and control must meet the task deadline requirements. The real-time performance of the bus network control system can be measured by the response time of information. Typical theoretical methods include Worst-case, Actual-case, Average, and Maximum. Actual-case considers both periodic and aperiodic information, while Worst-case considers the worst-case scenario during information transmission. Generally, the two are combined for real-time analysis. Bit rate is an important parameter in network real-time analysis. Its determination must take into account the communication distance, especially in high-speed communication, where the transmission delay caused by the increased distance is not negligible. Table 1 shows the relationship between CAN communication bit rate and bus length. Table 1 Relationship between Bit Rate and Bus Length 3 Node Hardware Design Main Contents 3.1 Typical Node Structure of CAN-Based Bus Network Control System The typical node structure of the CAN-based bus network control system is shown in Figure 2. The CAN transceiver, optocoupler, and CAN controller work together to send and receive messages. The microcontroller initializes the CAN controller, sets its operating parameters, and controls it to perform communication tasks such as data reception and transmission. It can also receive signals from peripheral devices and sensors, and control the actuator's operating status. Sensors/actuators perform signal detection, uploading, and execution of control commands. Peripheral devices are responsible for human-machine interaction. Figure 2 shows a typical node structure of a CAN-based bus network control system. 3.2 CAN Controller CAN controllers can be divided into independent CAN controllers and CAN controllers integrated with microprocessors. They perform the functions of the CAN protocol data link layer (DLL), implementing message framing, arbitration, acknowledgment, error detection, and calibration in the Media Access Control (MAC) sublayer, as well as message filtering, overload notification, and recovery management in the Logical Link Control (LLC) sublayer. Independent CAN controllers include PCA82C200, SJA1000, and 82526/82527. CAN controllers integrated with microprocessors include P8xC591, LPC2290/2292/2294, MC68HC05X4/X16/X32, MC68HC705X4 and TMS320C2000 series DSP chips. Independent CAN controllers can be connected to various types of microprocessors and are more flexible in use compared with integrated CAN controllers. The most widely used independent CAN controller is SJA1000. 3.3 CAN transceiver The CAN transceiver completes the function of the physical layer of the CAN protocol and is the interface between the CAN controller and the physical transmission line. CAN transceivers include PCA82C250/251[2], TJA1050/1040[3-4], TJA1054[5] and TJA1041[6], etc. Some characteristics are compared as shown in Table 2. Since the bus is powered by 24V DC, the PCA82C251 is generally used as the CAN transceiver for the bus. Table 2 Comparison of Some Characteristics of Different CAN Transceivers 3.4 Transmission Medium of CAN Bus The transmission media used for CAN bus include twisted pair, coaxial cable, and optical fiber. Twisted pair has a higher cost-performance ratio. In high-speed operating mode, the transistors in the output stage of the CAN transmitter will switch on and off as quickly as possible. In this mode, no measures are taken to limit the rising and falling slopes, and shielded cables should be used to avoid radio frequency interference (RFI) problems. In slope control mode, unshielded twisted pair is allowed. However, to reduce RFI and consider EMC issues, the rising and falling slopes should be limited. At the same time, 120Ω load resistors should be connected to both ends of the bus to suppress reflections. The load resistor located inside the ECU should be removed because if one of the ECUs is disconnected from the bus, the bus will lose its terminal, affecting information transmission. 4 Node Software Design 4.1 CAN Controller Initialization and Information Transmission and Reception The CAN controller software design of the CAN-based bus network control system mainly includes three parts: CAN controller initialization, information transmission, and information reception. Although the software implementation methods of different CAN controllers are different, the basic principles are the same. Taking SJA1000[7] as an example, its initialization is performed in reset mode. The main tasks are to set the parameters and status of registers such as controller working mode, receiving filtering mode, receiving code and masking code, baud rate and interrupt enable; the information sending program is responsible for performing relevant condition judgments, sending the message to the sending buffer, and starting the sending command; in the information receiving program, after judging and processing the bus status, error alarm, message format, etc., the receiving command can be started. 4.2 Research and implementation of control strategy The control strategy is the basis for the bus network control system to realize the control function, which directly affects the correctness, reliability and effectiveness of the system application. At the same time, CAN is an event-triggered protocol, and studying the event-based system control strategy during bus operation is also a basic task in the design of bus network control system. The research on the control strategy of bus network control system must be based on the current situation of urban road traffic in China and take into account the factors of human-vehicle-road-environment system. The main function is: when the bus encounters a specific event during the driving process, the system applies intelligent control theory and technical methods to generate control strategy and control task. Each functional control device realizes the information transmission of each electronic control unit according to the pre-set control strategy, implements correlation and real-time control, and ensures the safety of vehicle driving. The intelligent control methods of control strategy [8] include hierarchical control, expert control, fuzzy control, neural control and learning control. 5 Summary This paper studies some key issues in the design process of bus network control system from different perspectives such as concept, system and node, analyzes the main factors affecting the system performance in the design process, and proposes relevant design methods and design principles. The work in this paper helps to improve the network control performance and provides a theoretical and technical basis for system development. References [1] CAN Specification 2.0, Robert Bosch GmbH, 1991. [2] PCA82C250/251 CAN Transceiver, Philips Semiconductors, 1996. [3] TJA1050 CAN High-speed transceiver, Philips Semiconductors, 2000. [4] TJA1040 High speed CAN transceiver, Philips Semiconductors, 2001. [5] Fault-tolerant CAN Transceiver PCA82C252 / TJA1053 / TJA1054 / TJA1054A Version 3.1, Philips Semiconductors, 2001. [6] TJA1041 CAN High-speed transceiver, Philips Semiconductors, 2001. [7]SJA1000 Stand-alone CAN controller, Philips Semiconductors, 1997. [8] Cai Zixing. Intelligent Control [M]. Electronic Industry Press, 2004.8.
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