Design of electric vehicle control system based on CAN bus

1. Introduction The CAN bus is a communication protocol developed by the German BOSCH company in the early 1980s to solve the data exchange between many control and test instruments in automobiles. The CAN bus has been widely recognized and used in the industry because of its outstanding reliability, real-time performance and flexibility, and it became an international standard and an industry standard in 1993, known as "the most promising field bus" One. The application of the bus technology represented by CAN in automobiles not only reduces the body harness, but also improves the car's availability. In the design of modern modern cars abroad, CAN has become a must-have technology. Cars such as Mercedes-Benz, BMW, Volkswagen, Volvo and Renault all use CAN as a means of networking controllers. At present, there is a big gap in the application of CAN bus technology in automobiles in China. The research on the application of CAN bus technology in electric vehicles is still in its infancy. Electric vehicles incorporate many electronic control systems, such as battery management systems, motor control systems, drive control systems, regenerative braking systems, and ABS systems. The large number of applications of electronic equipment will inevitably lead to the growth and complexity of body wiring, reduced operational availability, increased power loss on the line, and increased difficulty in troubleshooting. In particular, the introduction of a large number of electronic control units, in order to improve the utilization rate of signals, requires a large amount of data information to be shared among different electronic units, and a large number of control signals in the automobile integrated control system also need to be exchanged in real time. Meet this demand. The introduction of CAN bus technology into electric vehicles can overcome the above shortcomings and has broad application prospects. In this paper, the CAN bus technology is applied to the electric vehicle control system, and the universal expansion unit is used to solve the problem of the circuit design complexity of the electric vehicle electric control system, and the information of each electric control unit is optimized to achieve full information sharing to improve the electric vehicle control system. Performance purpose. Second, the characteristics of CAN bus CAN belongs to the field bus category, is a serial communication network that effectively supports distributed control or real-time control. CAN bus is widely used in industrial control field thanks to its own technical characteristics. (1) Only point-to-point, point-to-multipoint, global broadcast and other methods can be used to transmit and receive data through packet filtering without special "scheduling". (2) Flexible communication methods. 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 dividing the master and slave and without the node address and other node information. (3) CAN uses non-destructive bus arbitration technology. When multiple nodes send information to the bus at the same time, the node with lower priority will voluntarily quit sending, and the node with the highest priority can continue to transmit data without being affected, thereby Greatly save the bus conflict arbitration time, especially in the case of heavy network load, there will be no network paralysis. (4) The short frame format communication is adopted, the transmission time is short, the probability of interference is low, and it has an excellent error detection effect. The maximum number of bytes per frame is 8, which can meet the general requirements of control commands, working status and test data in the general industrial field. At the same time, 8B will not occupy too much bus time, thus ensuring the real-time nature of communication. (5) Each frame of CAN information has CRC check and other error detection measures to ensure the feasibility of data communication. 3. Application of CAN bus in electric vehicles The application of CAN bus in electric vehicles has the following advantages. (1) Reduce the number and volume of wiring harnesses required by each functional module. (2) Reduce the quality of the entire vehicle and lower the cost of the vehicle, have higher data transmission reliability and ease of installation, and expand the functions of the vehicle. (3) Some data such as vehicle speed, motor speed, and SOC can be shared on the bus, so redundant sensors are removed, the sensor signal lines are minimized, and the control unit can achieve high-speed data transmission. (4) The function can be expanded by adding nodes. If the data expansion adds new information, only the software needs to be upgraded. (5) Monitor and correct transmission errors caused by electromagnetic interference in real time, and store the fault code after detecting the fault. Many existing automotive network standards have different functions. In order to facilitate research and design applications, the SAE Vehicle Network Committee divides automotive data transmission networks into categories A, B, and C3. Class A is a low-speed network for sensor / actuator control. The data transmission bit rate is usually only 1 ï½ž 10kb / s. Mainly used in electric doors and windows, seat adjustment and lighting control. Class B is a medium-speed network for data sharing between independent modules. The bit rate is generally 10 to 100 kb / s. Mainly used in electronic vehicle information centers, fault diagnosis, instrument display and airbag systems to reduce redundant sensors and other electronic components. Class C is a high-speed, real-time closed-loop control multiplex transmission network with a maximum bit rate of up to 1Mb / s. It is mainly used for suspension control, traction control, advanced engine control and ABS systems to simplify distributed control and further reduce the body Wiring harness. So far, only the CAN protocol is the only vehicle control local area network that meets the requirements of a Class C network. 4. Scheme design 1. System schematic diagram

Figure 1 Schematic diagram of the system The system is mainly composed of drive control module, regenerative braking control module, motor control module, energy management module, battery control module, instrument display module and fault diagnosis module. Information communication between various control modules is realized through CAN. In addition to sending and receiving commands, some basic status information of the car (such as motor speed, battery charge state, vehicle speed, etc.) is the data that most control units must obtain. The control unit uses broadcast to send data to the bus. If all control units send data to the bus at the same time, data conflicts on the bus will occur. Therefore, the CAN bus protocol proposes bus arbitration that uses identifiers to identify data priorities. Table 1 shows the types of data received and sent by the electric vehicle electric control unit and the procedures for other units to share this information.

Table 1 Types of data received and sent by electric vehicle electric control unit

Note: T-send, R-receive 2. The block diagram of the module unit uses Universal Extension (UDU) when designing the nodes on the high-speed CAN. In this way, only by changing the software to achieve the different functions of each node, thereby simplifying the hardware system design. The structure of the universal expansion unit is shown in Figure 2.

Figure 2 Universal expansion unit AT89C52 is used as the microcontroller in the universal expansion unit. It is a low-voltage, high-performance CMOS 8-bit single-chip microcomputer, which contains 8kB of repetitively erasable read-only program memory (EPROM) and 256B random. Access data storage (RAM), compatible with the standard MCS251 instruction system, built-in universal 8-bit central processor and Flash storage unit, can be applied to many more complex system control applications. The CAN controller uses SJA1000 produced by Philips, which is an independent CAN controller used in automobiles and general industrial environments. It has all the necessary features required to complete the CAN high-performance communication protocol. The SJA1000 with a simple bus connection can complete the physical layer and All functions of the data link layer. It can store a complete message to be sent or received on the CAN bus. In addition, it has a 64-byte extended receive buffer REFIFO. The receive buffer is larger. While the microcontroller is processing a message, it can continue to receive other sent messages. Message. The bus transceiver uses PCA82C250, which provides a direct interface between the protocol controller and the physical transmission line, and can transmit data on two bus cables with differential voltage at a rate of up to 1Mb / s. The maximum number of connected nodes is up to 110. Using PCA82C250 can increase the communication distance, improve the system's instantaneous anti-interference ability, and reduce radio frequency interference. PCA82C250 and SJA1000 together constitute the control and interface circuit of the CAN bus. 5. Design of battery management and control system The battery is a key factor affecting the performance of the electric vehicle. It has a direct impact on the driving range, acceleration performance and maximum gradeability. The battery control system mainly monitors the working status of the battery (battery voltage, current and temperature), and manages the working status of the battery (to avoid over-discharge, over-charge, overheating and severe voltage imbalance between single cells) in order to maximize Use the storage capacity and cycle life of the battery. The structure is shown in Figure 3.