Application of Freescale MCU in battery management system

Publisher:Changsheng520Latest update time:2011-09-19 Keywords:Freescale Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In order to realize the real-time monitoring of electric vehicle batteries, a distributed battery management system for hybrid electric vehicles is proposed based on the research of the characteristics of lithium-ion batteries . The hardware system includes power module, main control module and submodule based on Freescale series microcontroller, balancing module and CAN bus communication module, etc.; the software system includes data acquisition and processing based on underflow interrupt, SOC estimation, balancing processing and CAN communication, etc.

The overall performance of hybrid electric vehicles depends largely on the power battery. A high-performance, high-reliability battery management system (BMS) can enable the battery to achieve optimal performance under various working conditions. The battery management system not only monitors the charge and discharge current, total voltage, single cell voltage and remaining power SOC of the hybrid electric vehicle battery, but also predicts the power intensity of the battery in order to monitor the battery's usage. Therefore, the battery management system is one of the important electronic control units of hybrid electric vehicles and plays an important role in ensuring the reliability and safety of the battery.

1 Functions of Battery Management System

The main functions of the battery management system include: collection of battery status parameters, prediction of battery status, battery pack fault diagnosis, balancing protection and communication.

1.1 Battery status parameter collection

All algorithms of the battery management system are based on the collected battery status parameters, so the accuracy of the data must be guaranteed. Freescale's integrated 10-bit A/D conversion module is used to complete the collection of single cell voltage, temperature, total voltage, and charge and discharge current.

1.2 Prediction of battery status

Battery state prediction includes two aspects. On the one hand, the battery state of charge is predicted based on the ampere-hour integration method; on the other hand, the maximum charge and discharge power is predicted based on current, voltage, and temperature as inputs. The vehicle controller uses these two parameters as reference to correctly distribute power.

1.3 Battery Pack Fault Diagnosis

Based on the collected parameters, it can diagnose battery temperature failures such as over-high or under-low, battery over-voltage or under-voltage in real time, and issue warnings for excessive battery charge and discharge current and battery pack insulation failure. This is an important technical means to ensure the reliability of the power battery system, vehicle driving safety, and meet the driving needs of users.

1.4 Balance protection

The difference of single cells not only makes the service life of battery pack much shorter than that of single cells, but also, for lithium-ion batteries, due to their high requirements for charging and discharging, when overcharging, over-discharging, over-current and short circuit occur, the pressure and heat of lithium-ion batteries will increase greatly, which is easy to produce sparks, combustion and even explosion. In order to ensure safety and stability, balanced measures must be taken.

1.5 Communication Function

Mainly refers to the CAN communication between the vehicle and the battery management system.

2 Distributed Battery Management System Hardware Composition

At present, there are two main ways to design a battery management system: distributed design and centralized design. A distributed battery management system divides the battery management system into several submodules and a main control module. Each submodule can independently complete functions such as battery information measurement, battery energy balancing, and communication. Each submodule is connected to a battery module, and the submodules and the main control module communicate through the bus. The main control module completes functions such as battery information processing, charge state estimation, battery fault diagnosis, battery pack thermal management, and battery pack and vehicle communication.

The main control module and submodule use Freescale 9S12 series DP512 and DG128 as processors respectively. The system hardware block diagram is shown in Figure 1.

2.1 Power Module

The voltage provided by the vehicle to the BMS is 12 V. The voltages required by the management system are: 5 V for the microcontroller and driver chip; ±15 V for the op amp and current sensor. A DC/DC module is used to convert the 12 V voltage into 5 V or 15 V. [page]

2.2 A/D conversion module

Frescale 16-bit series chips integrate a 10-bit A/D conversion module to meet the sampling accuracy requirements of the entire vehicle. The A/D sampling circuit includes voltage sampling, current sampling and temperature sampling. In the sub-module, CPLD is used to control the optocoupler array switch to implement module voltage inspection sampling. In the main module, the total voltage cycle is directly sampled; Hall sensors are used to implement current sampling; and thermistors are used to implement temperature sampling.

DG128 sends the battery module selection signal to CPLD in real time through I/O. CPLD sends control signals to the high-voltage photoelectric isolation switch array through internal AND/OR logic combination operations according to the transmitted signals, controlling the photoelectric switch solid-state relay to conduct in time; the selected module voltage signal is then preprocessed by linear isolation amplification and low-pass filtering, and finally enters the A/D conversion module of DG128. The switch array control isolation filter circuit is shown in Figure 2.

Switch Array Control Isolation Filter Circuit

As shown in Figure 3, let the total battery voltage be U, and the voltage across resistor R2 be U2. When the voltage across R2 is obtained, U can be inversely calculated. In order to improve the sampling accuracy of U2 and suppress high-frequency interference, a low-pass filter composed of resistor R3 and capacitor C1 is added at both ends of R2. After isolation by optical coupler AQW214, U2 is transmitted to linear photoelectric isolation amplifier link ISO124, and finally to A/D of DP512. After processing, U is obtained.

In Figure 4, the unidirectional conductivity of the diode is used to pass the positive and negative currents through the network composed of resistors and operational amplifiers, and finally convert them into voltage signals and enter the A/D module.

Current acquisition circuit

Temperature acquisition circuit

In Figure 5, RV in the dashed box is a thermistor, and R2 is a low-temperature drift precision resistor. The 5 V voltage is divided by R2 to obtain the resistance change of RV, and the corresponding temperature value is obtained by looking up the table. Like measuring other signals, the voltage signal converted by temperature also passes through a low-pass filter and enters the A/D module.

[page]

2.3 Balance module

According to the real-time collected data, when the battery management system believes that a single cell voltage BATn needs to be balanced, it gives a balance control signal EQ_CTRLn, the optocoupler is closed, the MOS tube is turned on, and the balance circuit is started, as shown in FIG6 .

Equalization circuit

2.4 CAN Communication Module

CAN communication is the information bridge between the vehicle and BMS, and between the BMS main control module and submodules. The submodule uploads the collected single cell voltage and temperature values ​​to the main control module through the CAN bus, and the main control module issues a balancing command to the submodule through the CAN bus; the main control module sends the battery parameters to the vehicle, and the vehicle controller makes energy allocation decisions through judgment. Freescale 9S12 series microcontrollers have integrated CAN module MSCAN, and external expansion pins CANTX and CANRX. PCA82C250 is also required as a driver chip, as shown in Figure 7.

3 Software Design of Distributed Battery Management System

The battery management system software is developed in CodeWarrior for HCS12V4.7 and written in C language. It includes the software design of the main control module and sub-module.

3.1 Main control module

The tasks of the main control module are: A/D conversion and data processing tasks, vehicle CAN receiving tasks, vehicle CAN sending tasks, system monitoring tasks, SOC and energy estimation tasks, and balancing processing tasks. The interrupts are: A/D acquisition interrupt, timer underflow interrupt, CAN receiving interrupt.

As shown in Figure 8, after the system initialization is completed, the software uses the underflow interrupt of the analog/digital subtraction counter to determine the execution cycle of the system, and the counting cycle is 5 ms. In the previous underflow interrupt program of the analog/digital counter, the voltage acquisition channel is selected and the vehicle CAN reception is queried; after 5 ms, when the underflow interrupt arrives, the interrupt service program starts the A/D conversion, enters the A/D interrupt after the conversion is completed, and starts the execution of other tasks, and so on. According to the vehicle control strategy, the refresh cycle of each frame of the battery status data on the CAN is 10 ms, so the clock beat of the underflow interrupt is set to 5ms. Accordingly, the execution cycle of all the above tasks is 10 ms.

[page]

3.2 Submodules

The tasks of the submodules are: A/D conversion and data processing tasks, internal CAN receiving tasks, internal CAN sending tasks, and balanced execution tasks. The interrupts are: A/D acquisition interrupt, timer underflow interrupt.

As shown in Figure 9, the software uses the underflow interrupt of the analog/digital subtraction counter to determine the execution cycle of the system, and the counting cycle is 2.5 ms. In the previous underflow interrupt program of the analog/digital counter, the voltage acquisition channel is selected and the internal CAN reception is queried; after 2.5 ms, when the underflow interrupt arrives, the interrupt service program starts the A/D conversion, enters the A/D interrupt after the conversion is completed, and starts the execution of other tasks, and so on. Among them, according to the protocol, the internal CAN sending task must be started after an A/D conversion to ensure a cycle of 10 ms, and the execution cycle of other tasks is 5 ms.

4 Conclusion

The balancing control function solves the overcharging problem caused by the unbalanced voltage of battery cells. The powerful data processing function, rich peripheral interfaces and good electromagnetic compatibility of Freescale 9S12 series microcontrollers meet all the requirements of hybrid vehicle battery management and have achieved good results in practice.

Keywords:Freescale Reference address:Application of Freescale MCU in battery management system

Previous article:A novel Bootloader design
Next article:Implementation of reactive power compensation algorithm for three-phase asymmetric load based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 21:26

Freescale MC9S08AW60 Assembly Learning Notes (Part 7)
  We wrote a delay subroutine before, but it only runs on the computer. Debugging in CodeWarrior can not give the intuitive effect of the delay. That is to say, we cannot intuitively get the effect of the delay no matter where the program runs. So we need to use this delay program, such as lighting up an LED light, le
[Microcontroller]
Freescale MC9S12XS128 serial port related functions
//Serial port initialization //Baud rate is 9600, 8-bit data format, no checksum, one stop bit, send in query mode void SCI_Init(void) {    SCI0BDH = 0x00;    SCI0BDL = 0x41; //Baud rate = BUSCLK/(16*BR )=38400, BUSCLK=40MHz 14400_0xae 38400_0x41 230400_0x0b    SCI0CR2 = 0x2C; //Send, receive allowed, receive in int
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号