Design of an electric vehicle control system based on CAN bus
2026-04-06 07:58:30··#1
**I. Introduction** The CAN bus is a communication protocol developed by the German company Bosch in the early 1980s to solve the data exchange problem among numerous control and testing instruments in automobiles. Due to its outstanding reliability, real-time performance, and flexibility, the CAN bus has gained widespread recognition and application in the industry, and officially became an international and industry standard in 1993, hailed as one of the "most promising fieldbuses." The application of bus technology, represented by CAN, in automobiles not only reduces vehicle wiring harnesses but also improves vehicle reliability. In the design of modern passenger cars abroad, CAN has become an essential technology; Mercedes-Benz, BMW, Volkswagen, Volvo, and Renault all use CAN as a means of networking controllers. Currently, there is a significant gap in the application of CAN bus technology in automobiles in my country, and research on its application in electric vehicles is still in its initial stage. Electric vehicles integrate many electronic control systems, such as battery management systems, motor control systems, drive control systems, regenerative braking systems, and ABS systems. The extensive use of electronic equipment inevitably leads to increased and complex vehicle wiring, reduced operational reliability, increased power loss in the lines, and increased difficulty in fault repair. In particular, with the large-scale introduction of electronic control units, in order to improve the utilization rate of signals, a large amount of data information needs to be shared in different electronic units. A large number of control signals in the automotive integrated control system also need to be exchanged in real time. Traditional wiring harnesses can no longer meet this demand. Introducing CAN bus technology into electric vehicles can overcome the above shortcomings and has broad application prospects. This paper applies CAN bus technology to the electric vehicle control system and uses a general-purpose expansion unit to solve the problem of circuit design complexity of the electric vehicle control system. It optimizes the combination of information of each control unit to achieve full information sharing and improve the performance of the electric vehicle control system. II. Characteristics of CAN Bus CAN belongs to the fieldbus category and is a serial communication network that effectively supports distributed control or real-time control. The widespread application of CAN bus in the field of industrial control benefits from its own technical characteristics. (1) Data can be transmitted and received in several ways, such as point-to-point, point-to-multipoint and global broadcast, simply by filtering the message, without the need for special "scheduling". (2) Flexible communication mode. CAN works in a multi-master mode. Any node on the network can actively send information to other nodes on the network at any time, without distinguishing between master and slave and without the need for node information such as station address. (3) CAN adopts non-destructive bus arbitration technology. When multiple nodes send information to the bus at the same time, the node with lower priority will actively withdraw from sending, while the node with the highest priority can continue to transmit data without being affected, thus greatly saving the bus conflict arbitration time. Especially when the network load is heavy, there will be no network paralysis. (4) It adopts short frame format communication, which has short transmission time, low probability of interference, and excellent error detection effect. Each frame contains a maximum of 8 bytes, which can meet the general requirements of control commands, working status and test data in the industrial field. At the same time, 8 bytes will not occupy too long bus time, thus ensuring the real-time performance of communication. (5) Each frame of CAN information has CRC check and other error detection measures to ensure the reliability of data communication. [b]III. Application of CAN bus in electric vehicles[/b] The application of CAN bus in electric vehicles has the following advantages. (1) Reduces the number and volume of wiring harnesses required for each functional module. (2) Reduces the overall vehicle weight and reduces the cost of automobiles. It has high data transmission reliability and installation convenience, and expands the functions of automobiles. (3) Some data, such as vehicle speed, motor speed, and SOC, can be shared on the bus, thus eliminating redundant sensors and minimizing sensor signal lines, enabling high-speed data transmission for the control unit. (4) Functionality can be expanded by adding nodes; if new information is added during data expansion, only software upgrades are needed. (5) Real-time monitoring and correction of transmission errors caused by electromagnetic interference, and storage of fault codes after fault detection. Currently, various automotive network standards have different functional focuses. To facilitate research and design applications, the SAE Vehicle Networking Committee divides automotive data transmission networks into three categories: A, B, and C. Category A is a low-speed network for sensor/actuator control, with a data transmission bit rate typically of only 1–10 kb/s. It is mainly used for the control of electric windows, seat adjustment, and lighting. Category B is a medium-speed network for data sharing between independent modules, with a bit rate typically of 10–100 kb/s. It is mainly used for electronic vehicle information centers, fault diagnosis, instrument displays, and airbag systems to reduce redundant sensors and other electronic components. Class C is a multi-channel transmission network for high-speed, real-time closed-loop control, with a maximum bit rate of 1Mb/s. It is mainly used for systems such as suspension control, traction control, advanced engine control, and ABS to simplify distributed control and further reduce vehicle wiring harnesses. To date, only the CAN protocol meets the requirements of Class C network for automotive control local area networks. [b]IV. Scheme Design[/b] 1. System Schematic Diagram [align=left][size=2] Figure 1 System Schematic Diagram This system mainly consists of a drive control module, a regenerative braking control module, a motor control module, an energy management module, a battery control module, an instrument display module, and a fault diagnosis module. Information communication between the various control modules is achieved through CAN. Besides sending and receiving commands, some basic vehicle status information (such as motor speed, battery state of charge, vehicle speed, etc.) is data that most control units must acquire. Control units broadcast data to the bus. If all control units send data to the bus at the same time, data conflicts will occur on the bus. Therefore, the CAN bus protocol proposes bus arbitration using identifiers to identify data priority. Table 1 shows the data types received and sent by the electric vehicle control unit and the procedures for other units to share this information. Table 1 Data Types Received and Transmitted by the Electric Vehicle Control Unit [/size][/align][align=left][size=2] Note: T - Transmit, R - Receive 2. Module Unit Circuit Block Diagram When designing the hardware for nodes on the high-speed CAN, a universal extension (UDU) is used. This simplifies the hardware system design by only changing the software to implement the different functions of each node. The structure of the universal extension unit is shown in Figure 2. [/size][/align][align=left][size=2] Figure 2 Universal Extension Unit The AT89C52 is selected as the microcontroller in the universal extension unit. It is a low-voltage, high-performance CMOS 8-bit microcontroller with 8kB of erasable programmable read-only memory (EPROM) and 256B of random access data memory (RAM). It is compatible with the standard MCS251 instruction set and has a built-in general-purpose 8-bit central processing unit and Flash memory unit, making it suitable for many complex system control applications. The CAN controller uses the Philips SJA1000, a standalone CAN controller for automotive and general industrial environments. It possesses all the necessary features required for the high-performance CAN communication protocol and features a simple bus connection, enabling it to perform all functions of the physical and data link layers. It can store a complete message to be sent or received on the CAN bus and also features a 64-byte extended receive buffer (REFIFO), providing a larger receive buffer and allowing the microcontroller to receive other incoming messages while processing one. The bus transceiver uses the PCA82C250, which provides a direct interface between the protocol controller and the physical transmission line, enabling data transmission at speeds up to 1Mb/s over two differential voltage bus cables. Up to 110 nodes can be connected. Using the PCA82C250 increases communication distance, improves system immunity to transient interference, and reduces radio frequency interference. The PCA82C250 and SJA1000 together form the control and interface circuitry of the CAN bus. [size=2][b]V. Battery Management and Control System Design[/b] For electric vehicles, the battery is a key factor affecting overall vehicle performance, directly impacting driving range, acceleration, and maximum gradeability. The battery control system primarily monitors the battery's operating status (battery voltage, current, and temperature) and manages its operation (avoiding over-discharge, overcharging, overheating, and severe voltage imbalances between individual cells) to maximize battery storage capacity and cycle life. Its structure is shown in Figure 3.[/align][/size][align=left][size=2] 1) Real-time monitoring of main and auxiliary batteries: The UDU collects battery voltage, current, and temperature during the charging and discharging process of the main and auxiliary batteries to monitor their operating status and perform fault diagnosis. 2) The UDU receives vehicle driving status data from the bus and adjusts the motor speed and power output in real time according to the vehicle's power requirements; when braking information is received, the control unit regulates the operation of the inverter and motor, activating the regenerative braking system to recover braking energy. 3) Predicting remaining battery capacity and corresponding remaining driving range: The control unit uses the collected charging and discharging current parameters and corresponding algorithms to predict the remaining capacity. At the same time, the remaining driving distance is estimated using the vehicle speed information received from the bus, and the estimation result is sent to the instrument display unit via the bus. [/size][size=2][b]VI. System Feasibility Design[/b] Due to the large temperature variation range (-45~100℃) inside the car, strong electromagnetic interference and other electronic noise, and harsh environment, in order to ensure the reliability of the system operation inside the car, it is necessary to improve the fault tolerance and anti-interference ability of the network structure itself. In the design, a combination of hardware and software is used for anti-interference. In terms of hardware, electromagnetic compatibility design is adopted, focusing on dealing with the interference introduced by electrostatic field, magnetic field and transmission line and circuit, and using filtering, decoupling, isolation, shielding and grounding, etc., and adding power supply voltage detection, watchdog circuits, etc. The specific measures are as follows. [/size][/align][align=left][size=2] (1) Shielded twisted pair cable is used for transmission line. (2) Watchdog timer is used for timeout reset. (3) An opto-isolation circuit composed of a high-speed isolation device 6N137 was added between the CAN controller SJA1000 and the CAN transceiver PCA82C250. The power supply was also isolated using a micro DC/DC module. (4) The CANH and CANL of the PCA82C250 were connected to the CAN bus through a 5Ω resistor, which can limit the current and protect the PCA82C250 from overcurrent impact. A 30pF capacitor was connected in parallel to the CANH and CANL and grounded, which can also filter high-frequency interference on the bus. (5) Damage to the transmission medium or the bus driver will destroy the reliable communication of CAN. If these faults are not automatically detected and corresponding measures are not taken to eliminate them, the system will lose communication capability in part or even completely. The effective way to solve this problem is to adopt redundant communication control, thereby ensuring the normal operation of the main functions of the communication system and improving the reliability of the system. In terms of software, fault comparison and fault tolerance technologies are used to perform software filtering on the signal, design power-on reset anti-interference program, and use effective fuse technology to design anti-instantaneous interference program, etc. [size=2][b]VII. Conclusion[/b] This paper introduces the characteristics of the CAN bus and its application in electric vehicles. It designs the node settings of an electric vehicle control system based on the CAN bus, and introduces a general-purpose expansion unit to simplify the system hardware design. The battery management control unit, which affects the performance of electric vehicles, is optimized. This system has the advantages of compact structure, high reliability, complete functions, and low cost, and can well meet the working requirements of electric vehicles. [/size][/align][align=left][size=2] 1) Real-time monitoring of main and auxiliary batteries: The UDU collects battery voltage, current, and battery temperature during the charging and discharging process of the main and auxiliary batteries to monitor the battery's working status and perform fault diagnosis. 2) The UDU receives vehicle driving status data from the bus and adjusts the motor speed and power output in real time according to the vehicle's power demand; when braking information is received, the control unit regulates the operation of the inverter and motor, and starts the regenerative braking system to recover braking energy. 3) Predicting the remaining battery power and corresponding remaining driving range: The control unit uses the collected charging and discharging current parameters to predict the remaining power. Simultaneously, the remaining driving range is estimated using vehicle speed information received from the bus, and the estimation result is sent to the instrument display unit via the bus. [ Editor: He Shiping ]