Evaluate
Modeling and simulation are important for electrical Results Modify Test Specify Optimal
system capacity determination and optimum component Vehicle Components
selection. The battery submodel is a very important
part of an electrical system simulation, and the battery
model needs to be highfidelity to achieve meaningful Finalize Verify System
simulation results. Current leadacid battery models can Vehicle Performance
(Vehicle Test)
be expensive, difficult to parameterize, and time
consuming to set up. In this paper, an alternative lead 1a. Conventional 1b. ModelBased
acid battery system model has been proposed, which Design Design
provided drive cycle simulation accuracy of battery
voltage within 3.2%, and simulation speed of up to
10,000 times realtime on a typical PC.
Figure 1 [6]: Component Selection Processes
A parameterization method has also been proposed, Voltage
with testing requirements of standard discharge and Current
1 I
Current theta (°C)
3 V (V)
V ns 1
2 Cell Temp Voltage
DOC R1 (Ohm) Gain
Ambient DOC R1 R1
Temp theta_a theta (°C)
theta
Ps Compute R1
Thermal Model
theta (°C) SOC C1 (F)
C1
2 Tau1
DOC Tau1 Ps
theta DOC
DOC SOC
Im SOC
Im SOC SOC Em (V)
SOC Em Em
theta
Charge and Capacity theta (°C)
Compute Em
Im SOC R0 (Ohm) Im
SOC R0 R0
Compute R0
Ps SOC
SOC R2 (Ohm)
Im R2 R2
Im
Im
Compute R3
Vpn
Im
Ps
1
Modeled Using Simulink®
EQUIVALENT CIRCUIT E m = E m 0 − K E (273 + θ )(1 − SOC ) (1)
R0 = R00 [1 + A0 (1 − SOC )]
R1
(2)
Em
Rp
where:
Ep R0 was a resistance in Ohms
R00 was the value of R0 at SOC=1 in Ohms
2 A0 was a constant
N
SOC was battery state of charge
[Main Branch] [Parasitic
Branch]
Main Branch Resistance 1
Figure 4 [6]: Battery Equivalent Circuit
Equation 3 approximated a resistance in the main
The battery equivalent circuit represented one cell of the branch of the battery. The computation was performed
battery. The output voltage was multiplied by six, the inside the “Compute R1” block in Figure 3. The
number of series cells, to model a 12 volt automotive resistance varied with depth of charge, a measure of the
battery. In Figure 3, the number of series cells was battery’s charge adjusted for the discharge current. The
entered into the Gain block with parameter value “ns.” resistance increased exponentially as the battery
The voltage multiplication by six assumed that each cell became exhausted during a discharge.
behaved identically. Figure 4 shows the electrical circuit
diagram containing elements that were used to create R1 = − R10 ln (DOC ) (3)
the battery circuit equations.
where:
Each equivalent circuit element was based on nonlinear
equations. The nonlinear equations included R1 was a main branch resistance in Ohms
parameters and states. The parameters of the equations R10 was a constant in Ohms
were dependent on empirically determined constants. DOC was battery depth of charge
The states included electrolyte temperature, stored
charge, and circuit node voltages and currents. The
Main Branch Capacitance 1
equations were as follows:
Equation 4 approximated a capacitance (or time delay)
Main Branch Voltage
in the main branch. The computation was performed
inside the “Compute C1” block in Figure 3. The time
Equation 1 approximated the internal electromotive
constant modeled a voltage delay when battery current
force (emf), or opencircuit voltage of one cell. The
changed.
computation was performed inside the “Compute Em”
block in Figure 3. The emf value was assumed to be
constant when the battery was fully charged. The emf C1 = τ 1 R1 (4)
varied with temperature and state of charge (SOC).
where:
C1 was a main branch capacitance in Farads
τ1 was a main branch time constant in seconds
R1 was a main branch resistance in Ohms
the battery could hold. State of charge (SOC) measured
the ratio of the battery’s available charge to its full
Main Branch Resistance 2 capacity. Depthofcharge (DOC) measured the fraction
of the battery’s charge to usable capacity, because
Equation 5 approximated a main branch resistance. The usable capacity deceased with increasing discharge
computation was performed inside the “Compute R2” current. The equations that tracked capacity, SOC, and
block in Figure 3. The resistance increased DOC were as follows:
exponentially as the battery state of charge increased.
The resistance also varied with the current flowing Extracted Charge
through the main branch. The resistance primarily
affected the battery during charging. The resistance Equation 7 tracked the amount of charge extracted from
became relatively insignificant for discharge currents. the battery. The charge extracted from the battery was
a simple integration of the current flowing into or out of
exp[A21 (1 − SOC )]
the main branch. The initial value of extracted charge
R2 = R20 (5) was necessary for simulation purposes.
1 + exp( A22 I m I ∗)
Qe (t ) = Qe _ init + ∫ −I m (τ )dτ
t
(7)
where: 0
Equation 6 approximated the parasitic loss current which Equation 8 approximated the capacity of the battery
occurred when the battery was being charged. The based on discharge current and electrolyte temperature.
computation was performed inside the “Compute Ip” However, the capacity dependence on current was only
block in Figure 3. The current was dependent on the for discharge. During charge, the discharge current was
electrolyte temperature and the voltage at the parasitic set equal to zero in Equation 8 for the purposes of
branch. The current was very small under most calculating total capacity.
conditions, except during charge at high SOC. Note that
while the constant Gpo was measured in units of Automotive batteries were tested throughout a large
seconds, the magnitude of Gpo was very small, on the ambient temperature range. Lab data across the entire
order of 1012 seconds. tested current range showed that battery capacity began
to diminish at temperatures above approximately 60°C.
⎛ VPN (τ p s + 1)
The lookup table (LUT) variable Kt in Equation 8 was
⎛ θ ⎞⎞
I p = VPN G p 0 exp⎜ ⎟⎟ used to empirically model the temperature dependence
+ A p ⎜1 − (6)
⎜ ⎜ ⎟⎟
⎝ θf
VP 0 of battery capacity.
⎝ ⎠⎠
C ( I ,θ ) = , K t = LUT (θ )
K c Co* K t
where:
1 + (K c − 1)(I I *)
δ (8)
Ip was the current loss in the parasitic branch
VPN was the voltage at the parasitic branch where:
Gp0 was a constant in seconds
τp was a parasitic branch time constant in seconds Kc was a constant
VP0 was a constant in volts C0* was the noload capacity at 0°C in Ampseconds
Ap was a constant Kt was a temperature dependent lookup table
θ was electrolyte temperature in °C θ was electrolyte temperature in °C
θf was electrolyte freezing temperature in °C I was the discharge current in Amps
I* was the a nominal battery current in Amps
δ was a constant
Equation 9 calculated the SOC and DOC as a fraction of θ was the battery’s temperature in °C
available charge to the battery’s total capacity. State of θa was the ambient temperature in °C
θinit was the battery’s initial temperature in °C, assumed to be
charge measured the fraction of charge remaining in the equal to the surrounding ambient temperature
battery. Depth of charge measured the fraction of 2
Ps was the I R power loss of R0 and R2 in Watts
usable charge remaining, given the average discharge Rθ was the thermal resistance in °C / Watts
current. Larger discharge currents caused the battery’s Cθ was the thermal capacitance in Joules / °C
charge to expire more prematurely, thus DOC was τ was an integration time variable
t was the simulation time in seconds
always less than or equal to SOC.
Qe Qe
SOC = 1 − , DOC = 1 − BATTERY PARAMETER IDENTIFICATION
C (I avg , θ )
(9)
C (0, θ )
Parameterization of a battery model, such as the
where: procedure proposed in [1], can be complex and difficult.
The parameterization process in [1] requires difficult,
SOC was battery state of charge nonstandard test procedures. A more automated
DOC was battery depth of charge approach was studied in detail and implemented. The
Qe was the battery’s charge in Ampseconds automated approach used an optimization routine to
C was the battery’s capacity in Ampseconds
θ was electrolyte temperature in °C
adjust the battery model parameters, using discharge
Iavg was the mean discharge current in Amps and charge test data.
DATA REQUIREMENTS
Estimate of Average Current
The parameterization method required standard lab test
The average battery current was estimated as follows in data. For discharge, full batteries were discharged at
Equation 10. constant currents and temperatures. For charge,
batteries were charged at constant current, until the
Im terminal voltage approached the gassing voltage [5] for
I avg = (10) the battery. Then, the charges were continued at
(τ 1 s + 1) constant voltage, until the batteries reached a full
charge. Several typical currents and ambient
where: temperatures were used for the testing procedure. The
quality and consistency of the lab data were very
Iavg was the mean discharge current in Amps important in achieving a good fit with the lab data. The
Im was the main branch current in Amps
data showed some significant variability between tests,
τ1 was a main branch time constant in seconds
but the majority of the variability observed was at open
circuit (no current). An example is shown in Figure 5.
THERMAL MODEL
LeadAcid Battery Discharge Curves
Electrolyte Temperature 13
⎛
⎜⎜ Ps −
(θ − θ a ) ⎞⎟ 10.5
Rθ ⎟⎠
Current
t ⎝
0
θ (t ) = θ init +∫ dτ (11) 10
0 Cθ 0
0 5 10
Time (hours)
12
Stop
Initial SOC Variation
11.5 Here 13.5
SOC = 100%
init
11 13 SOCinit = 90%
12.5
10.5
Voltage
0 0.5 1 1.5 2 2.5
Time (hours) 12
11.5
Figure 6 [6]: MeanValue Discharge Curves
11
The overall estimation process involved several steps:
10.5
1. Optimizing capacity model 0 1 2 3 4 5
Time (hours)
2. Optimizing discharge parameters
3. Optimizing charge and discharge parameters
Figure 7 [6]: Initial SOC Variation
Step 1: Capacity Model Optimization The last 25% of the measured discharge data was
ignored for the initial optimization. The data was
The capacity was calculated from discharge test data for ignored because a large voltage error would occur if
each tested temperature and discharge current. The there was a slight error in the capacity, causing the
meanvalue discharge curves were used. Then, an simulated battery to fully discharge and the voltage to
optimization routine2 was used to adjust the nonlinear drop off before the tested battery voltage did. The
capacity parameters to best fit the capacity equations to voltage error would throw off the optimized parameters
the measured mean capacities. These optimized significantly.
parameter values were the final capacity parameters.
After the optimization, each of the results was plotted for
Step 2: Discharge Optimization analysis. The curve fitting was considered to be
reasonable. Some typical fitting variability under
Next, the battery parameters were optimized to minimize different battery conditions is shown in Figure 8 and
the error between measured and simulated discharge Figure 9. Some variability was typical at the beginning
curves. Only parameters that affected the discharge and end of the discharge cycle, including differences in
simulation were tuned3. The tuned parameters were the battery’s capacity. Some of the differences were
given an initial value and min/max constraints. attributed to using different physical batteries for each
lab test.
The selection of the parameters and constraints for
optimization was not a trivial process. Determining
which parameters affected only the discharge cycles
was not immediately straightforward. The parameter
2
Using Optimization Toolbox®
3
Using Simulink Parameter Estimation®
Example Charge Tuning Result
Battery Discharge Result
30
13.5
20
Current
13
Simulated
10 Measured
12.5 Simulated
Voltage
Measured
0
12 0 1 2 3 4
11.5 14
Voltage
13.5
11 13
0 2 4 6 8 Simulated
12.5 Measured
Time (hours)
0 1 2 3 4
Figure 8 [6]: Discharge Curve Example 1 1
SOC/
DOC
0.5 SOC
DOC
Battery Discharge Result 0
0 1 2 3 4
13 Time (hours)
12.5
Figure 10 [6]: Final Charge Curve  Worst Case
Simulated Example Observed
Measured
Voltage
12
Example Discharge Tuning Result
13.5
11.5
13
11
0 2 4 6 8 Simulated
Time (hours) 12.5 Measured
Voltage
0.5 SOC
both the discharge and charge. Consequently, both DOC
discharge and charge test data and parameters were 0
0.5 1 1.5 2 2.5 3
used in the final optimization. Simulated voltage and Time (hours)
current both needed to be optimized for charging curves
only, because neither was held constant throughout the
entire tests. Weight coefficients were used to balance Figure 11 [6]: Final Discharge Curve  Worst Case
the optimization of the current vs. voltage errors, Example Observed
because the raw current and voltage values had some
magnitude difference. Additional Tuning
The results were reasonable with respect to the battery After the major optimizations, the battery’s thermal
test data. Many of the simulated and measured results model was adjusted manually. The thermal resistance
lined up very closely. Note that the discharge test and capacitance were adjusted based on data from the
results did worsen slightly during the combined charge application of the battery in a vehicle test. The
and discharge optimization (step 3), but the curves were adjustment was made because the thermal properties
still very close. Some of the worstcase results depend heavily on the installation of the battery in a
observed are shown in Figure 10 and Figure 11. vehicle.
The parameters R1 and τ1 affected the end of discharge Measured vs. Simulated Voltage
slope and time constant. The parameters were tuned4
with a few discharge curves that included the after 13.4
discharge settling time, similar to the curves shown in
13.2
Figure 5. The parameters were not wellexercised in
the rest of the battery parameter estimation process, so
13
they had to be tuned separately. Once the parameter
Voltage
values were determined, the entire fitting process was 12.8
rerun with the new values to ensure an optimal fit to the
lab data. 12.6
FUTURE WORK
1
Env Temp Battery modeling is a difficult and timeconsuming task.
Ambient Temp
SOC 2 Given additional time, many additions and changes
+ SOC could have been made to improve the results.
Improvements have a point of diminishing returns when
Batt Harness Cell Temp 1 the error experienced in the battery model becomes

Temp smaller than the variability experienced with real
Ceraolo Battery batteries. However, there were a few improvements that
could have been investigated to further improve the
Figure 12 [6]: Battery Model for Electrical System battery parameterization process.
Simulation
Battery Aging and Typical Performance
Speed and Accuracy
Undesired aging effects can occur when test batteries
The battery model was capable of simulating one hour of are fully charged and discharged repeatedly. In this
simulation time in less than half a second of real time. paper, a new battery was tested for only four discharge
The simulation was performed on a typical PC using a and charge cycles, to minimize aging effects. However,
RungeKutta (4, 5) variable step solver. Openloop input the possibility of instead obtaining parameterization data
current data was used at a 1 second sample time. with weaker, brokenin batteries should be studied.
Using slightly aged batteries might improve the battery
To validate the battery model, a test vehicle was run parameterization, allowing simulation of more typical
through several drive cycles to gather actual RPM, electrical system performance.
temperature, and battery current and voltage data to
compare to the simulation. An example is shown in Simpler Application to Other Batteries
Figure 13. The battery model was simulated using
RPM, temperature, and current inputs. On a 1hour Approximating parameters for a battery of the same
stopandgo cycle, the accuracy of the simulated battery chemistry but different capacity should be possible
model voltage was within 3.2% (0.42 Volts) throughout. without repeating the entire data collection and
On a 1hour idling simulation with transmission in park, optimization process. In this paper, two battery
the voltage was within 1.2% (0.15 Volts). capacities were parameterized, however, a direct
relationship could not be found between the optimized
parameters of each of the two batteries. The lack of a
direct relationship between parameters of two batteries
having the same chemistry but different capacity could
have been caused by “noise” in the battery data or by
some parameters not being sensitive. The parameter
relationship for different capacities would be a very
useful topic for further study, because a capacity
relationship could provide a cost savings if a few known
4 adjustments could be made to the parameters to create
Using Simulink Parameter Estimation®
additional battery sizes without repeating the entire test REFERENCES
process for each new battery capacity.
1. Schöttle, R., W. Müller, H. Meyer, and E. Schoch.
Measuring Battery Capacity “Methods for the Efficient Development and
Optimization of Automotive Electrical Systems,”
Battery capacity was very difficult to estimate correctly. 970301, SAE, Warrendale, PA, 1997.
One reason for the difficulty was battery variability. 2. Wootaik Lee, Hyunjin Park, Myoungho Sunwoo,
Another reason for the difficulty was that ensuring the Byoungsoo Kim, Dongho Kim. “Development of a
battery was fully charged before discharge testing was Vehicle Electric Power Simulator for Optimizing the
not easy. Fully charging the battery was more of an Electric Charging System,” 2000010451, SAE,
issue at higher temperatures where charging losses are
Warrendale, PA, 2000.
significant, and thus achieving a full charge becomes
3. Ceraolo, Massimo and Stefano Barsali. “Dynamical
difficult. The charging difficulties at higher temperatures
Models of LeadAcid Batteries: Implementation
should be taken into consideration during the lab testing
Issues,” IEEE Transactions on Energy Conversion.
process. The batteries should be as completely charged
as possible before discharge tests begin. Vol. 17, No. 1, IEEE, March 2002.
4. Ceraolo,. “New Dynamical Models of LeadAcid
Batteries,” IEEE Transactions on Power Systems.
CONCLUSION
Vol. 15, No. 4, IEEE, November 2000.
A leadacid battery model was developed, along with 5. D. Linden and T. B. Reddy (editors), Handbook of
tools to parameterize the model from laboratory data. Batteries, 3rd edition, McGrawHill, New York, NY,
Construction of an equivalent circuit model has been 2001.
described. A semiautomated process was used to 6. The MathWorks, Inc. retains all copyrights in the
estimate parameters for the battery model from figures and excerpts of code provided in this article.
laboratory data. The completed battery model simulated These figures and excerpts of code are used with
at approximately 10,000 times realtime. The accuracy permission from The MathWorks, Inc. All rights
of the simulated battery model voltage was within 3.2% reserved.
in comparison to vehicle drive cycle measurements.
ACKNOWLEDGEMENTS CONTACT