BMS Algo
BMS Algo
Abstract
The battery management system (BMS) of a
hybrid-electric-vehicle (HEV) battery pack comprises
hardware and software to monitor pack status and
optimize performance. One of its important functions
is to execute algorithms that continuously estimate
battery state-of-charge (SOC), state-of-health (SOH),
and available power. The accuracy of these algorithms
is critical for the proper sizing of the battery pack.
Correspondence/Reprint request: Dr. Gregory L. Plett, Department of Electrical and Computer Engineering
University of Colorado at Colorado Springs, 1420 Austin Bluffs Parkway, P.O. Box 7150, Colorado Spring
CO 80933–7150, USA. E-mail: [email protected]
2 Gregory L. Plett
1. Introduction
This article presents advanced algorithms for a battery management
system (BMS) for hybrid-electric vehicle (HEV) application. We assume that
the BMS must be able to estimate battery state-of-charge (SOC), instantaneous
available power, and parameters indicative of the battery state-of-health (SOH)
such as power fade and capacity fade, and be able to adapt to changing cell
characteristics over time as the cells in the battery pack age. The algorithms to
be described accomplish these goals and have been successfully implemented
on a Lithium-Ion Polymer Battery (LiPB) pack.
A hybrid-electric vehicle is one with both a gasoline (or diesel) engine and
an electric motor. In the most common configuration commercially available,
both the engine and the motor are coupled directly to the power train, where
the motor provides boost energy to supplement the engine and acts as a
generator when coasting, braking, or when the engine can supply extra power
to charge the battery pack. Such “parallel-hybrid” systems are cost effective as
their battery packs can be modestly sized. Even so, and because of the
demanding requirements on a pack of limited capacity, advanced methods
must be used to estimate SOC, SOH, and instantaneous power in order to
safely, efficiently and aggressively exploit the pack capabilities.
The battery pack of an HEV comprises a number of sub-components: the
cells themselves (typically wired in series to generate a high voltage, but
sometimes also wired in parallel to develop higher currents), power electronics
to disconnect the pack should there exist an unsafe operating condition, a
thermal conditioning system, the electronic BMS, and sensors for voltages,
current, and temperature. The BMS is frequently microprocessor based, which
allows flexibility in the kinds of algorithms that can be executed.
Various algorithms for SOC estimation (in particular) have been very well
explained elsewhere in a few excellent tutorial articles [1,2]. Instead of
duplicating these efforts, we focus here on the approach that has been the most
successful in our own experience: variants of the ubiquitous Kalman filter,
which is an algorithm for estimating the present value of the time-varying
unmeasurable “state” of a dynamic system. Kalman filters were introduced in
1960 [3,4] in the context of estimating hidden system states for the purpose of
BMS algorithms for HEV SOC and SOH estimation 3
controlling a linear system, for which they are the optimal solution, and are
now commonly employed in control systems, communications, defense, image
processing, space, and GPS navigation applications. A unique benefit of the
Kalman filter over other estimation approaches is that it automatically provides
dynamic error-bounds on its own state estimates. By modeling our battery
system to include the wanted unknown quantities in its state description, a
Kalman filter estimates their values and gives error bounds on the estimates.
We exploit this fact to give aggressive performance from our battery pack,
without fear of causing damage by over-charge or over-discharge.
At first glance, the equations and theory behind Kalman filtering can
appear opaque. It is obvious to ask whether the HEV BMS application requires
such complexity. The answer to this question depends on the design
specifications given to the BMS software engineers for the errors allowed on
estimates of SOC, SOH, and maximum power. These specifications are often
very aggressive since being able to optimize the cost, weight, size and reliability
of major HEV systems is critical to maximizing the value of the HEV to the end
customer1. In order to counteract imprecise algorithms, one has to over-design
the rest of the pack—a one-time expense of algorithm development can quickly
overcome the accumulated per-unit cost of an over designed battery pack. To
that end, advanced algorithms are often warranted, and we do not know of any
algorithms able to produce better estimates than those presented here.
Further, the simple algorithms typical of a portable-electronic battery pack
just don’t work in the HEV environment. One reason is that the cells in an
HEV battery pack are very rarely in an equilibrium state (ruling out simple
voltage measurements to predict SOC via the cell’s OCV versus SOC
relationship). This is due to HEVs requiring very high electrical current
relative to the capacity of the cells, with present vehicles demanding up to ±20
times the C-rate, and future systems presently in development requiring higher
relative rates2. The rate profile (current as a function of time) for HEV is also
very dynamic as HEVs are typically designed so that the battery/motor system
handles the instantaneous load transients and the engine handles the average
load [5,6]. Coulomb-counting methods also cannot be used as they inherently
integrate any error of the current sensor, and become unstable without some
__________________________
1
Of the components comprising the propulsion of an HEV, the costliest is the battery
pack, which may represent 30−35% of the total cost of the propulsion system. The
battery is among the heaviest components of the propulsion system as well. Therefore,
careful design of the battery pack and the BMS can dramatically impact the lifetime
affordability of an HEV.
2
The “C-rate” of a cell refers to the nominal capacity of the cell divided by one hour,
and thus is the constant-current rate required to discharge a cell in one hour from a fully
charged a priori condition. It is measured in amperes or milli-amperes.
4 Gregory L. Plett
reset mechanism. HEV battery packs are never fully recharged to a known
SOC, so simple reset mechanisms are not available. Ad hoc combinations of
these two approaches are often attempted, employing reset mechanisms and
correction factors for age, temperature, and so forth, but we feel that the
resulting complexity ends up to be greater than that of the Kalman filter. In
summary, we propose that the kinds of algorithms presented in this article
provide the best solution for robust long-term deployment.
We now proceed by discussing requirements for a BMS in the HEV
environment. We then introduce the concept of model-based state estimation,
present the sigma-point Kalman filter (SPKF) as an example, and proceed to
show how model parameters can also be estimated using a “joint SPKF.” Using
the output of the joint SPKF, we show how to predict pack power and calculate
cells to be equalized. We present some simulation results and some conclusions.
3. Model-based estimation
All forms of model-based estimation, of which the Kalman filter is one
example, rely on a mathematical description of the dynamics governing the
quantities being estimated. Here, we employ a “state-space” model of cell
dynamics:
6 Gregory L. Plett
(1)
(2)
• The actual input current to the cell is measured. This value is used as input
to the model.
• The model equations are evaluated to predict the present cell state and
output voltage, with use of the measured input current and known (or
adapted) model-equation parameters.
• The actual cell voltage is measured. If the predicted model’s state and
parameters are exact, then there is no difference between the actual cell
voltage and the model’s estimate. Any difference is because of an error in
the estimate of cell state or parameters.
• The cell-model state prediction and parameter estimates are adapted to
lower the cell voltage estimation error.
____________________________
3
Interestingly, some other reported methods for SOC estimation using Kalman filtering
do not use SOC as a state variable [10,11]. These methods then do not have the ability
to directly infer error bounds on their estimate of SOC.
BMS algorithms for HEV SOC and SOH estimation 7
This same approach works even when the cell model is not in fact perfect, or when
there is noise on the sensors, but adaptation of the model’s state and parameter
estimates must be made more slowly because of the additional uncertainty.
In order to optimally perform the adaptation step, the algorithm must internally
weigh uncertainties re. the model equations themselves, uncertainties re. the
present state estimate, and uncertainties re. the values indicated by sensors. These
are represented mathematically by covariance matrices of the appropriate variables.
The variables themselves are understood to hold the expected value of the
quantities that they represent. Since the algorithm must know these uncertainties, it
has the added capability of being able to determine error bounds (for example,
3-sigma or 6-sigma error bounds) on all estimated quantities.
To be more formal in our discussion of the steps of model-based
estimation, we first define some notation. In the sequel, a superscript “–”
denotes a predicted quantity, a superscript “+” denotes an updated estimate of
that quantity, a circumflex “^” denotes an estimated quantity, a tilde “~”
denotes an estimation error, and denotes the covariance of its subscripted
variable. Further, we define to be the statistically expected value of its
argument, and to be the history of measurements until time
. Different types of Kalman filter then exactly compute or approximate the
following six steps repeatedly:
Notice that the output estimation error is scaled by the gain matrix and used to
adapt The gain m atrix tends to have large entries for states whose value is
uncertain (high covariance) and small entries for measurements with a high
degree of sensor noise. The gain matrix optimally combines new and old
information in the filter.
EKF. A set of points (sigma points) is chosen so that the (possibly weighted)
mean and covariance of the points exactly matches the mean and covariance of
the a priori random variable. These points are then passed through the
nonlinear function, resulting in a transformed cloud of points. The a posteriori
mean and covariance that are sought are then approximated by the mean and
covariance of this cloud. Note that the sigma points comprise a fixed small
number of vectors that are calculated deterministically—not like the Monte
Carlo or particle filter methods.
Specifically, if the input random vector x has dimension n, mean and
covariance then p + 1 = 2n + 1 sigma points are generated as the set
with columns of indexed from 0 to p, and where the matrix square root
computes a result such that Usually, the efficient Cholesky
decomposition [19,20] is used, resulting in lower-triangular R. The reader can
verify that the weighted mean and covariance of agree with the original
mean and covariance if we define the weighted mean and weighted covariance
as
and
as the ith column of , and both and as real scalars with the
necessary (but not sufficient) conditions that sum to one and that
sum to one. Then, for a specific set of we can show agreement
between the weighted mean and covariance of , and the true mean and
covariance of random variable x. Sigma-point methods differ only in these
weighting constants: values for the two most common methods—the
Unscented Kalman Filter (UKF) [17,18,21–24] and the Central Difference
Kalman Filter (CDKF) [25–27]—are summarized in Table 1. The UKF is
derived from the point of view of estimating covariances with data rather than
Taylor series. CDKF uses Stirling's formula to approximate derivatives rather
than using Taylor series. Although the derivation is quite different than UKF,
the final method is essentially identical. The CDKF has only one “tuning
parameter” which makes implementation simpler. It also has marginally
higher theoretic accuracy than UKF [26], so we focus on this method in the
application sections later.
To use SPKF in an estimation problem, we first define an augmented
random vector that combines the randomness of the state, process noise,
BMS algorithms for HEV SOC and SOH estimation 11
and sensor noise. This augmented vector is used in the estimation process as
described below.
SPKF step 1: State estimate time update. Each measurement interval, the state
estimate time update is computed by first forming the augmented a posteriori
state estimate vector for the previous time interval: and
the augmented a posteriori covariance estimate:
These factors are used to generate the p + 1 sigma points:
From the augmented sigma points, the p + 1 vectors comprising the state
portion and the p + 1 vectors comprising the process-noise portion
are extracted. The process equation is evaluated using all pairs of and
(where the subscript i denotes that the ith column is being extracted from
the original matrix), yielding the a priori sigma points for time step k.
Finally, the a priori state estimate is computed as
SPKF step 2: Error covariance time update. Using the a priori sigma points
from step 1, the a priori covariance estimate is computed as
SPKF step 3: Estimate system output yk. The system output is estimated by
evaluating the model output equation using the sigma points describing the
spread in the state and noise vectors. First, we compute the points
The output estimate is then
12 Gregory L. Plett
SPKF step 4: Estimator gain matrix Lk. To compute the estimator gain
matrix, we must first compute the required covariance matrices.
R+ and R− , the hysteresis rate constant and the maximum level of hysteresis
M. Combined, they are
We assume that there is a true value for that describes the cell under
consideration, and wish to adapt an estimate to converge to the true value.
To do so using a Kalman-filtering approach, we require a state-space model for
the “dynamics” of the true parameters
This equation states that the parameters are essentially constant, but that they
may change slowly over time by some driving process, modeled by a process
rk of small fictitious “noise”.
Within a joint filter, the dynamics of the state and the dynamics of the
parameters are combined to make an augmented system. We can write this in
one of two ways:
or
The second notational convention combines the state and parameter vectors
into a single vector and combines the state process noise and parameter
process noise into a single vector Similarly, the state and parameter
dynamics are combined into the functions and
With these new conventions, we see that the parameters of a system
simply augment the state of the cell model, and the SPKF method can be
applied directly to this augmented model. The method is summarized in
Table 4.
6. Power estimation
One advantage of the proposed methodology for state and parameter
estimation is that the present estimates may be used as input to the other BMS
algorithm functions in Fig. 1. In this section we describe how the estimates
help determine the dynamic power capability of the pack; in the next section
we describe how it may be used to help equalize the pack to maximize
availability.
BMS algorithms for HEV SOC and SOH estimation 15
Discharge and charge currents with all limits enforced are computed as
Any of these electronic means may be used with the method to be described
here as well—the electronic means are very well described in reference
[moore].
With side information comprising the individual cell SOC estimates, and
individual capacities and/or cell Coulombic efficiencies, available from a joint
SPKF, another opportunity presents itself. We propose that equalizing cell
voltage is only approximately the correct thing to do. Recall that the purpose
of equalization is to maintain the battery pack in a state where the maximum
level of charge and discharge power is available for use. Cells that limit the
pack availability may then be boosted or bucked in order to improve
performance. We present a method to do so.
Cells are equalized in order to maximize the available power from the
battery pack. For SOC of cell n at level the “distance” in ampere-hours
from the upper limit (present charge capacity) is
and the distance in ampere-hours from the lower limit (present discharge
capacity) is
1. Compute for all cells, and sort from smallest to largest. The cells
with smallest value may benefit from having some charge depleted (via
bucking, charge shuffling, or energy transformation) prioritized in reverse
order by the magnitude of its .
2. Compute for all cells, and sort from smallest to largest. The cells
with smallest value may benefit from having charge added (via boosting,
charge shuffling, or energy transformation) prioritized in reverse order by
the magnitude of its .
BMS algorithms for HEV SOC and SOH estimation 19
The SPKF may also contribute the estimation error bounds from the SOC
estimate to help determine when to stop equalization. For example, one might
turn off equalization if the difference between maximum and minimum
and the difference between maximum and minimum falls
within where “fn( )” is some function and is the estimated
covariance of the SOC estimation error. Also, if the same cell is targeted for
both boosting and bucking, it is the cell limiting performance whether or not its
SOC is changed, so equalization may be turned off.
If cell capacity information is not individually available, then the nominal
capacity may be used. If cell Coulombic efficiency information is not
individually available, then the nominal efficiency may be used. If so, the
procedure then equalizes SOC, which is not exactly the same as equalizing cell
voltage. If all cell dynamic characteristics are equal, then the method becomes
the same as equalizing by voltage.
8. ESC model
The cell model that we use in this article is one that we have called the
“enhanced self-correcting” (ESC) cell model [8,29,30], which has equations
that describe the evolution of SOC, polarization voltages, and hysteresis, and
which takes into account open-circuit-voltage and ohmic losses.
The basis for the SOC state-equation is developed as follows: If
we know that where C is the
nominal capacity of the cell, i(t) is the cell current at time t, and is the
Coulombic efficiency of the cell. A discrete-time approximate recurrence may
then be written as where ∆t is the sampling period
(in hours). This recurrence is used to include SOC in the state vector of the
cell model as it is in state equation format already, with SOC as the state and
as the input.
The dynamics of the change of polarization voltage are also captured
by a state equation. We add “filter states” with linear dynamics:
The vector α has N filter “poles”, with for
stability, corresponding to time constants of the polarization voltage dynamics.
We use N = 2.
A further phenomenon captured by a state equation is that of hysteresis. A
cell that has recently undergone a charge event will have a higher rest voltage
20 Gregory L. Plett
than one that has undergone a discharge event, even at the same SOC. That is,
voltage does not decay to OCV, but retains a factor based on the hysteresis of
the cell4. A hysteresis state implementing a linear-time-varying difference
equation may be modeled as:
9. Simulation results
In this section, we present some results obtained using the proposed
algorithms. In order to do so, we would ideally present estimates of SOC (etc.)
plotted versus true values of SOC for some example tests. We immediately run
into a problem, however: regardless of which BMS estimation algorithm is
used, the primary difficulty when validating any such algorithm on physical
_________________________
4
We note that hysteresis is not a phenomenon generally associated with lithium-ion
systems, since most applications have been in the light portable electronics area where
SOC accuracy is not as critical as in the HEV application and where temperatures are
not as extreme. It is, however, very pronounced at low temperatures and can lead to
SOC errors as large as ±40% if the estimate is based simply on OCV (even with full
cell relaxation.)
BMS algorithms for HEV SOC and SOH estimation 21
cells is that the “truth” values are not known. There are no sensors that can
directly measure SOC, SOH, or available power. At different points in time,
laboratory tests can be performed that can be used to determine a posteriori
what the SOC/SOH/power was at that time, but cannot determine
SOC/SOH/power in real time, as the battery pack operates.
We have developed a simulation-based validation methodology as one
component of a strategy that overcomes this obstacle [31]. A software
simulator of cell dynamics first synthesizes various driving, temperature,
parameter, and sensor-fault profiles for the battery pack being modeled. All
internal variables that are dependent on the cycling history of the cell (e.g.,
SOC/ SOH/ power) are known to the software simulator, so “truth” values are
established. The input-output behavior of this model has been tested against
physical cells, and works well. We call this the “Data Generator System”
(DGS). The BMS algorithms are then executed using this synthetic cell data as
input, and the algorithm results are compared to the “truth” values.5
The synthesized data was generated using a model of a fifth-generation
prototype LiPB cell that is very similar to the one presented in [14,15],
but with a somewhat higher capacity. Root-mean-square (RMS) model
error versus cell tests conducted using an Arbin BT2000 are on the order of
5–10 mV over all operating conditions.
Figure 2. Profiles of current and cell voltage versus time for the tests described herein.
Figure 3. Plots of true SOC, estimated SOC, and SOC estimation error.
BMS algorithms for HEV SOC and SOH estimation 23
Figure 4. Plots of SOC estimation error and true resistance versus resistance estimate
when the SPKF was intentionally initialized with bad values to test robustness.
Figure 5. Plots of maximum (absolute) charge current and power compared to their
estimated values.
24 Gregory L. Plett
the root-mean-squared (RMS) current estimation error was less than 2 A, and
the RMS power estimation error was less than 9 W.
10. Conclusions
This article has presented algorithms based on sigma-point Kalman
filtering that may be used to estimate battery pack SOC and parameters
indicative of SOH, such as resistance and capacity. The output of these
algorithms may further be used as input to methods that estimate available
power or determine which cells require equalization. While the algorithms are
mathematically complex, they are computationally feasible and have been
implemented on a simple 16-bit microcontroller for a medium-sized HEV
pack. We feel that the one-time cost in implementing an advanced algorithm in
software is on the whole more affordable than the accumulated per-unit costs
of a pack that is over-designed to compensate for poor algorithms.
We have elsewhere reported results with measured cell data—here we
present results using synthetic data, where the advantage is that the “true” state
and parameter values are known exactly, so that errors in estimation may be
computed exactly. A properly initialized filter will have good estimation
performance—we rarely see SOC errors greater in magnitude than 3%. A
poorly initialized filter converges to the truth values over time. We have found
the time constants to be sufficiently fast.
In conclusion, we propose that the kinds of algorithms presented here can
enhance lifetime affordability of HEV, and present the best algorithmic
solution for long-term deployment.
Acknowledgment
This work was supported in part by Compact Power Inc. (CPI). The use of
company facilities is gratefully acknowledged.
References
1. Piller, S., Perrin, M., and Jossen, A. 2001, J. Power Sources, 96(1), 113-20.
2. Pop, V., Bergveld, H. J., Notten, P. H. L., Regtien, P. P. L. 2005, Meas. Sci.
Technol., R93−R110.
3. Kalman, R. 1960, J. Basic Engineering 82, Series D, 35−45.
4. http://www.cs.unc.edu/~welch/kalman/kalmanPaper.html, accessed 20 May 2004.
5. Butler, K.L., Ehsani, M., and Kamath, P. 1999, IEEE Trans. Veh. Technol. 48(6),
1770−78.
6. Ehsani, M., Gao, Y., and Butler, K. 1999, IEEE Trans. Veh. Technol. 48(6),
1779−87.
7. Moore, S. W., and Schneider, P. J. 2001, Proc. SAE 2001 World Congress, paper
2001-01-0959.
8. Plett, G. L., 2004 J. Power Sources 134(2), 262−76.
BMS algorithms for HEV SOC and SOH estimation 25
9. Dhameja, S., Electric Vehicle Battery Systems, Newnes Press, Boston 2002.
10. Lürkens, P., Steffens, W. 1986, etzArchiv, 8(7), 231−36.
11. Barbier, C., Meyer, H., Nogarede, B., and Bensaoud, S. 1994, Proc. Intl. Conf. of
Inst. Mech. Eng., Automotive Electronics, 29−34.
12. Plett, G. L. 2004, J. Power Sources, 134(2), 252−61.
13. Plett, G. L. 2004, J. Power Sources, 134(2), 277−92.
14. Plett, G. L. 2006, J. Power Sources, 161(2), 1356−68.
15. Plett, G. L. 2006, J. Power Sources, 161(2), 1369−84.
16. Wan, E., van der Merwe, R., and Nelson, A. 2000, Neural Information Processing
Systems 12, MIT Press, 666−72.
17. Wan, E., and van der Merwe, R. 2000, Proc. IEEE Symposium (AS-SPCC).
18. Wan, E., and van der Merwe, R. 2001, Kalman Filtering and Neural Networks,
Wiley Inter-Science, 221−82.
19. Press, W., Teukolsky, S., Vetterling, W., and Flannery, B. 1992, Numerical
Recipes in C: The Art of Scientific Computing, 2nd Edition, Cambridge Univer-
sity Press.
20. Stewart, G. 1998, Matrix Algorithms, Vol. I: Basic Decompositions, SIAM.
21. Julier, S., Uhlmann, J., and Durrant-Whyte, H. 1995, Proc. Am. Ctrl. Conf,
1628−32.
22. Julier, S., and Uhlmann, J. 1996, A general method for approximating nonlinear
transforma-tions of probability distributions, Tech. rep., RRG, Department of
Engineering Science, Oxford University.
23. Julier, S., and Uhlmann, J. 1997, Proc. 1997 SPIE AeroSense Symposium, SPIE.
24. Julier, S., and Uhlmann, J. 2004, Proc. IEEE 92(3) 401−22.
25. Nørgaard, M., Poulsen, N., and Ravn, O. 2000, Advances in derivative-free state
estimation for nonlinear systems, Technical rep. IMM-REP-1998-15, Dept. of
Math. Modeling, Tech. Univ. of Denmark, 28 Lyngby, Denmark.
26. Nørgaard, M., Poulsen, N., and Ravn, O. 2000, Automatica 36(11) 1627−38.
27. van der Merwe, R., and Wan, E. 2003, Proc. Workshop on Advances in Machine
Learning, available at http://www.iro.umontreal.ca/~kegl/CRMWorkshop/ pa-
perMerweWan.pdf.
28. Press W. Press, S. Teukolsky, W. Vetterling, B. Flannery, Numerical Recipes in C:
The Art of Scientific Computing, 2d, Cambridge University Press 1992.
29. Plett, G. L. 2003, Advances in EKF SOC estimation for LiPB HEV battery packs,
in: CD-ROM Proc. of the 20th Electric Vehicle Symposium (EVS20).
30. Plett, G. L. 2005, Results of Temperature-Dependent LiPB Cell Modeling for HEV
SOC Estimation, in: CD-ROM Proc. 21st Electric Vehicle Symposium (EVS21).
31. Plett, G. L., Billings, R., and Klein, M. J. 2007, Desktop and HIL Validation of
Hybrid-Electric-Vehicle Battery-Management-System Algorithms, Proc. SAE
Congress 2007 Conference was in Detroit, MI, April 2007.