Real-Time Estimator Li-ion Cells Internal Resistance for Electric Vehicle Application

No actual battery chemistry allows a single cell to meet electric or hybrid vehicle's power demand and energy storage requirements. Hundreds of cells in series and/or parallel are common in modern battery packs. Liion and Li-Po chemistries are today's most trusted families for power-capable and light-weighed battery packs. However, using Li-ion or Li-PO for electric vehicle (EV) propulsion comes with one flaw: small differences in the cells capacity and self-discharge current will result in local overcharges and overdischarges after only a few charge-discharge cycles, which, if not asserted, will greatly impede the battery pack lifetime [1], [2]. Furthermore, cell overcharging may result in fire or explosion and other safety issues for the end user.


Introduction
No actual battery chemistry allows a single cell to meet electric or hybrid vehicle's power demand and energy storage requirements. Hundreds of cells in series and/or parallel are common in modern battery packs. Liion and Li-Po chemistries are today's most trusted families for power-capable and light-weighed battery packs. However, using Li-ion or Li-PO for electric vehicle (EV) propulsion comes with one flaw: small differences in the cells capacity and self-discharge current will result in local overcharges and overdischarges after only a few charge-discharge cycles, which, if not asserted, will greatly impede the battery pack lifetime [1], [2]. Furthermore, cell overcharging may result in fire or explosion and other safety issues for the end user.
To lengthen the battery pack life cycle and reduce risks of failure, a battery management system (BMS) is a necessary add-on to the battery pack for the monitoring and control of the cells behavior. As the accurate chemical reaction is complex, electrical models were created in order to translate some aspects of the chemical reactions in the cells into measurable electrical parameters [3]. Fig. 1 presents a classic electrical model for Li-ion batteries. Typically, the cell behavior can be represented with a voltage source, function of the State-of-Charge (SOC), a complex impedance Rin composed of an ohmic resistance RΩ and a polarization impedance Zpol, which both together represents the cell losses (proportional to i 2 ), and a leaking resistor Rleak, which represents long-term charge loss. Rin should actually be expressed as a complex impedance Zin, but for a coherent representation with current literature, it will be denoted as Rin in this paper. A number of researchers have argued that such models lack in accuracy. Thus, more advanced (and complex) models have been proposed, to describe the cell behavior [4], [5]. These models often mix electrical, thermal and chemistry considerations in order to achieve high accuracy. Recent studies have also proposed cell modeling including Kalman filters, space-state models, parametrical or complex impedance. Although these models demonstrate accuracy and reliability, never could they be implemented in automotive processors in order to be suitable for low-cost electric or hybrid vehicles designs [6]. These more complex, more advanced models can be implemented for real-time identification of their parameters only if they run off-line on desktop computers (running at around 3 GHz with 4 to 8 processors in parallel), but cannot be adapted to an on-line measurement of the cell behavior on a single core at 80 or 100 MHz, which is necessary in the scope of a vehicle implementation. In this sense, these models cannot be implemented to achieve a real-time computation loop while monitoring many cells in a real EV application.
To answer this issue, this paper presents a real-time working algorithm which allows the on-line identification of the cell model. The proposed algorithm supports the simultaneous model identification of 16 Li-ion cells and can be run with less than 500 kbytes of memory on an 80 MHz CPU. This model uses no logarithm functions, nor the computation of exponential, square roots or power functions. The proposed implementation is also entirely made with fixed-point data.
The remainder of this paper is organized as follows. Section 2 describes the BMS requests overview to design an accurate system for EV application. The proposed approach, including the algorithm is presented in Section 3. The test methodology as well as the bench test are fully depicted in Section 4. Section 5 presents the implementation and main results. Finally, Section 6 presents the main conclusions of this work

Cell voltage, current and temperature measurements
Every aspect of the electrical model presented in Fig. 1 can be modeled throughout 4 basic readings: voltage, current, temperature and a time-reference. With these four measurements, the model parameters of Fig. 1 can be estimated in real-time.
Voltage readings of individual cells comes from an analog to digital converter (ADC). Every input should be isolated from the other. Application Specific Integrated Circuits (ASICs) on the market already exists, which offer measuring features especially dedicated to Li-ion voltage readings, like built-in passive balance outputs or daisy-chainable integrated circuits [7], [8]. String current measurement can easily be accomplished by using a Hall-effect transducer in series with the cell string. As most studies suggest [9], [10], temperature variations between adjacent cells is small enough to assume homogenous cell temperature under normal operation. Thus, in the proposed implementation, temperature is measured for a group of cells (generally between 4 and 10). The time reference is easily assured by the real-time clock and calendar (RTCC) peripheral built-in in the used controller.
In EV applications, current and voltage will vary with the vehicle acceleration. To have a good representation of the voltage drop and current demands, it is suggested to have a 10 Hz acquisition rate [3]. As the temperature won't change as fast as the current and the voltage, a 1 Hz refresh rate is judged enough.

Rin estimation
Various methods have been proposed for measuring or estimating the internal resistance (Rin) of a Li-on cell. In this work, Rin is taken as the equivalent resistor placed in the voltage-source-resistor classic electrical model which would produce a given voltage drop for a given current demand. This Rin can also be split into two distinct contributions: the ohmic resistance (which is constant over every frequency (denoted RΩ) and the polarization impedance which varies with the variation of the current flow (denoted Zpol). This polarization impedance is made with a succession of RC circuits, denoted Rpol and Cpol. Each RC circuits will have distinct time constant. Some of those will have a fast response time constant, with τ ≈ 1 ms, and some will have a slow response time constant, with τ ≈ 1 s.
When implementing a resistance measurement algorithm on a real-time controller, Rin is estimated every couple of seconds due to the high number of cells. Thus the fast response Cpol part will always be completely charged, making its associated Rpol fully effective to the voltage drop. The RΩ will be a representation of (RΩ + Rpol) for the fast response parts of Zpol and Rpol will only be a representation of slow response parts.
One method used to get the Rin estimation while using very low computation time is given in (1). This estimation can be run many times during a current pulse, enabling to separate RΩ from Rpol, as shown in Fig. 2 [11].
where ΔV, in volts, is the voltage drop, ΔI, in ampere, is the current drop and Rin, in Ohms, is the estimated internal resistance. The same equation apply for positive pulse (i.e. in charge mode). Figure 2: Estimation of Rin, RΩ and Rpol [11] It is known that Rin will be influenced by the cell temperature, current magnitude, SOC and aging [2]. The BMS software should implemented a method to differentiate a Rin variation based of each of those factors, and treat threat, if any, accordingly.
The more Rin estimations the BMS can get, the better it can make relations against current, SOC and temperature. While the BMS don't control the current demands, it should constantly evaluate changes and execute (1) if ΔI is greater than a defined threshold. For the BMS described in section 4, a threshold of ±200mA (both charge and discharge) was used and shown good results. If the threshold was reached, the BMS wait for the current pulse to reach its maximum before attempting a Rin reading. With those conditions, the BMS was able to get a Rin update for each cell every 100 mHz. A good Rin estimation is important for EV application as it define the available power (P), heat generation (losses L) and the cell efficiency (Eff), as described in (2). EV designers will often change their regenerative braking strategies in order to maximize efficiency or to limit losses. The same idea goes for hybrid vehicle, the internal combustion engine will be used with the electric motor to achieve the highest efficiency for the task. If the Rin is not correctly estimated, those strategies may miss the optimal point.
Where OCV is the open circuit voltage in volts, I is the current in ampere, P is the developed power in watts, Loss is the heat generated in watt and Eff is the overall efficiency of the cell.

SOC estimation
A useful information to the driver is the amount of energy available in the battery pack. A percentage of the remaining energy in relation to its maximum value is defined as the SOC of a Li-ion cell. A minimum SOC value is targeted for every cell and also for the overall battery pack (so the driver will not force a cell into an over-discharged state).
SOC estimation can be carried out by determination of the Ampere-hour (Ah) drained from the cells. depth of discharge (DOD) can also be used. An important difference between the SOC and the DOD representation concerns the various SOC values in a string for a given DOD. As a given current value flows in a string of cells, where each cell as a distinct capacity, the DOD for a series of cell will be the same, but each will have a different SOC. DOD will also take in account the relative efficiency of the cell with temperature and current demands [6], [12]. These efficiency correction tables come from experimental values. DOD and SOC of each cells is acquired with (3) and (4).
where ΔDOD, in Ah, is the increase of the depth of discharge, k1 is the efficiency correction factor for the given current value, k2 is the efficiency correction factor given for this temperature, I, in A, is the current amplitude.

Capacity measurement
In order to monitor the fading of the cell capacity with time, the BMS requires a calibration discharge once in a while. The calibration discharge process involves a complete discharge of the cell energy and a monitored recharge. There is no mandatory frequency but a monthly capacity check is proposed here. As the vehicle cannot be driven during such a calibration process, it is necessary that the vehicle computer selects the appropriate time for automated diagnostics of duration of about 3 hours, where the vehicle is out of duty. Night time is probably the most suitable period of time for this task.
The function of monthly capacity estimation is actually not implemented in the EVs actually on the market. However, in the proposed BMS function breakdown, it is proposed that the capacity self-measurement be implemented. The measurement of capacity is proposed as follows: 1) Full recharge and full equalization of the battery pack; 2) 1 C constant discharge, with all DOD being monitored, until one of the cells reaches the end of discharge voltage; 3) Passive balancing of every cell until each cell reaches the end of discharge voltage; 4) The time required to empty each cell (converted in Ah) is added to the DOD of item #2, this final DOD represent the capacity of the cell; 5) Calibration is terminated with a full charge and full equalization of the battery pack.

SOH estimation
As the cell ages, its ability to store and deliver energy will fade. This is caused by the loss of reagents in the cells electrodes through irreversible and unwanted reactions in the cell. Those unwanted reactions take place normally in the cell at a normal pace through the cell lifetime, but may be quickly accelerated if the cell steps out of its safe operating area.
Generally, the loss of reagents will reduce the amount of storable energy (i.e. the capacity) or the ability to deliver this energy quickly (i.e. the Rin). Thus, the state of health (SOH) of a cell or of a battery pack will reflect a percentage of those performances by comparison with a brand new cell [13]. Firstly, a capacity fade threshold can be established for minimum drivable range for the electric vehicle. Secondly, the heat evacuation capability based on the Rin at full power will be a concern, where a maximum Rin value may be established as a limit parameter for the EV. A general replacement threshold for performance is suggested at 80 % of initial capacity and 200 % of initial Rin. A 100 % SOH cell will act as a brand new cell and a 0 % will not deliver the designed performance (or will produce too much heat to do so). The SOH can be expressed as: where C0 is the initial capacity in Ah, Cmin is the minimum acceptable capacity in Ah, Ct is the current capacity, R0 is the initial Rin, Rmax is the maximum acceptable Rin and Rt the current Rin.
To prevent the SOH to drop quickly if the Rin rise with one strong current demand, the Rt come from an average over a few hours.

Leakage estimation
Any cell will be affected by self-discharge, that is SOC decreasing naturally with time, even if the cell is not used. This leakage comes from the non-perfect isolation in the electrolyte between the two electrodes. Even though this leakage current is very small, it differs from one cell to another, and will drift with temperature changes or SOH evolution. This will result in small variations in the DOD of every cell in a battery pack.
Generally, this phenomenon is so slow that regular equalization through balancing will cover up the effects. It is one of the essential functions of the BMS to provide equalization.

Balancing of charges
As seen with past sections, every cell will show different capacity and different leakage current which will result in small variations in the SOC through the entire battery pack. If not corrected, the battery will be limited in its use as the higher SOC will limit the charge (to prevent this cell from overcharging) and the lower SOC will limit the discharge (to prevent this cell from over discharging). Each percent of the SOC between these two extremes will be an unusable stored energy, and will decrease the battery pack performance.
A simple strategy to limit this phenomenon is to balance the cells, which means to bring back all SOC to a common point. For example, passive balancing is used for bleeding the excess energy of cells with a higher SOC at the end of charge until all cells reach 100 % at the same moment in time (i.e. their maximum Voltage in the SOA where the cell is considered as full). Active balancing is another, more complex, way of balancing charges where instead of losing exceeding charges in heat, the BMS move charge from one cell to another (or from/to a group of cells) through converters [2], [3], [14].
For this research, passive balancing was implemented with MOSFETs and 47 Ω resistors.

Proposed Methodology for the monitoring of Rin
Measuring the internal resistance of hundreds of cells simultaneously and recording the evolutions of each resistance over time with low-cost is a challenge. Having a single processor core computing the cell model repeatedly for each cell will exceed its capability if the calculation algorithm is not properly designed. Having a model too complex will require more processors for the same number of cells; or require stronger processors. Using more processors or more advanced ones for a same number of cell will make this solution more expensive and less attractive for automotive highly competitive market.
The model proposed in this paper works on a PIC32MX795F512L and can support the real-time computation of the cell parameters for at least 16 cells. The novelty of the proposed method relies on the way Rin is monitored. The proposed strategy uses the simple method expressed in (1), but stores the Rin value in such a way that they are able to build trends for each driving conditions encountered. In the long run, estimations output by this method are as accurate as the ones from the complex models, but requires less computational time and less memory usage.
In order to get relevant results, the assumption is made that the current impulse used to get Rin is short enough to consider the starting edge from the final edge in the same driving conditions.

Typical chronological data logging and its limitation
In previous applications, BMS stores all recorded data chronologically, by sampling every value of Rin measured and storing it into memory. Every reading will be timestamped and placed one after the other in memory. Typically, the Rin will be placed along its driving condition (current, temperature, SOC, etc.) in one big data structure. To provide an accurate estimation, the BMS will have to average some readings together in order to have a relevant output [3]. At some point, a large number of data will be saved in memory. These readings will eventually full the onboard RAM memory and the BMS will have to address his reading to a slower, yet bigger, memory -typically a FLASH device capable of holding a couple of gigabyte of information.
When making a Rin average, a BMS do not want to blindly take the latest readings, as the driving conditions and the associated Rin can change quickly. In order to get a good picture of the Rin, the BMS will have to search through its entire data log for other measures captured in a similar combination of current, temperature and SOC. This search for relevant data is somewhat random and can require thousands of unnecessary access to the memory peripheral.
Therefore, the BMS would rather know where is stored relevant data instead of knowing when it was recorded. With this approach, the chronological data logging is not the best option for EV BMS.

A new data logging method
In fact, it would better to store data based on diving condition rather than linear in time. To do so, the BMS proposed in this paper creates a five-dimension cloud in memory where each coordinates represents a Rin measured in a given driving condition. The relation between those coordinates and a physical 32-bit memory address is given in Fig. 3. The {Temp., SOC, I, Rin} combination will create a four-dimension matrix in a single file in memory. For convenience, the fifth dimension (the cell #) was made through 16 separate files in memory. The cell number could have been added in the matrix segmentation shown in Fig. 3, but experience shown that working with separate files for each cells was easier [3]. Every time a Rin is measured in a given driving condition, the memory space associated with those coordinates is increased by one. Upon recovering, the value stored in memory represent the number of time this Rin at these driving condition was measured; the higher the number, the more weight it will get in the following calculations.
The main advantage of using this storage method is that the BMS doesn't need to search its values through time. It can directly access the relevant section in the cloud, leaving the irrelevant part untouched. The number of requests on the data bus between the CPU and the memory, being one of the slowest section of a BMS, is cut down to a minimum.
During run-time, the BMS will want to correlates its actual reading with past values. The current combination of {Temp, SOC, Current, Rin} will be the starting point. The BMS will gather the count stored within this memory slot. Then, the BMS will look on both sides of each axis and gather a set of measures all close to the starting point. This set will be called the group . The farther the measure is from the starting point (i.e. the center of ), the less relevant it is for the BMS, so a weight value will be added to represent the distance between a recovered measure and the center of .
Once every data is recovered in memory, the BMS can make a solid Rin estimation with the multi-dimensional moving average presented in (6) [3].
Note should be taken that using this method removes any relation between measures and time. In order to forget old and less relevant values, the BMS shall decrease some count value to all memory slots in the cloud matrix when the EV is not running. This decay allows the Rin to evolve on a long period of time -as it's expect to rise through the passing years.

Benchmarking the cells
Rin from this model will be compared with a precise, trusted and non-real-time method. If both data correlates, it means that the used model is correct and the Rin data estimated in real-time by the BMS is relevant.
An electronic load was used with an oscilloscope to generate trusted current pulses and precise voltage recordings in order to benchmark the cells. The recordings were analyzed with a MATLAB script to extract cells values. The baseline data is shown in Table 1. RΩ, Rpol and Rin were measured for a 10 A current pulse.

Test Methodology
In order to test the new data logging method, a fully functional BMS has been made. Following every requirement mentioned in section 2, the BMS was implemented on a PIC32MX795F512L of Microchip Technologies (for computation and time reference), three BQ76PL536 of Texas instrument (for voltage and temperature readings) and a Hall-Effect sensor for a current input. The battery pack was made of 16 LiFePO4 cells. Fig. 4 shows a picture of the resulting bench test. Figure 4: The bench test A programmable electronic load and a programmable power supply were placed in a circuit with this battery pack. These two device where electronically controlled to produce current patterns which would occur in a real driving cycle. Those current curves come from a World-wide Motorcycle Emissions Test Cycle (WTMC) driving cycle applied to a three-wheel recreational motorcycle [13], [15], [16].
The current curves for one WTMC cycle is shown in Fig. 5. Other current curves were used, like step of 1 C, 2 C, 4 C, 6 C and 8 C, but are not shown.

Results
First thing to be tested with the BMS is the cell voltage discrepancies. Fig. 6 shows that the voltage of each cell is individually measured along with the line current.
With these individual values, the BMS is able to acquire many Rin estimation through a driving cycle, as seen in Fig. 7. From this figure, two things can be clearly seen. First, the Rin is not constant from one cell to the other in the same row. Secondly, the Rin of each cell rises when the current increases. Based on that second observation, all values where gathered and averaged to form a Rin versus current graph, shown in Fig. 8. With this figure, the real-time BMS indicates that the Rin is higher with higher current demands. So a BMS cannot take a single Rin measurement, memorize such a single value and keep it for each subsequent calculation. This Rin vs I relation must be kept if the BMS wants to make accurate estimations. With those readings, it was observed that the same current pulse does not produce equal voltage drops for the same cell, resulting in different Rin estimations. This leads to another test where each recorded Rin value was counted and expressed as a function of the current demand. A few cells, like cell #11 in Fig. 9, showed very large distribution, while other cells, like cell #13 in Fig. 10, showed very narrow distribution.
Another interesting observation is that Rin readings where not constant over the whole SOC range. As seen in Fig. 11, Rin is higher near 100 % of SOC and near 0 %.
Since Rin estimations changed from one measuring time to the other but not in a uniform manner, it is important to consider the average behavior of the battery pack. The following table expresses the mean value of the 16 cells for their minimum value, mean value and maximum value. Through all measured data, a σ was calculated to express the level of variation, the σ shown in Table 2 represent the mean value of all σ of the 16 cells.  It is worth noticing that the recorded Rin is always higher than the Rin value provided in the manufacturer datasheet. This said, special care must be taken when designing a battery pack (especially for range or cooling requirements) as the real usable power will be lower than announced. For example, a 10 mΩ cell under 8

Conclusions
This papers presents a clear model for monitoring Li-ion cells and shows basic BMS functionality. The advanced and complex models currently offered allow to fully understand cells behavior, but when applied to a multitude of cells of an EV battery pack, it cannot be mount on small automotive embedded processor. In order to monitor >10 cells, the model used must sacrifice some accuracy to maintain real-time monitoring.
The proposed model on this paper is less precise than advanced model, but it is able to achieve relevant performances for EV applications. The BMS software runs on an 80 MHz, single processor, and is able to monitor 16 cells in real-time. One novelty comes from the Rin readings storage and recover method. Having a fast response way to store and recover data in memory enable the real-time model to keep the relation between Rin and the driving conditions. Future work will quantify benefits of this method over traditional chronological data logging and will present some advanced BMS algorithm to enhance Li-ion life span.