Battery Equivalent Circuit
Libraries:
Simscape /
Battery /
Cells
Description
The Battery Equivalent Circuit block models the electro-thermal dynamics of a battery by using electrical circuit elements with variable characteristics and a zero-dimensional lumped-mass thermal heat equation. You can also use this block to simulate the faulted dynamics of a battery in shorted, open-circuit, and thermal runaway conditions. To model cycling aging and calendar aging of the battery, you can use lookup tables or empirical relationships. The block tabulates the variable characteristics of the electrical circuit elements as functions of the battery state of charge (SOC) and, optionally, current directionality and temperature. This block comprises these constituent model files:
Electrical model
Open-circuit voltage and hysteresis model
Instantaneous overpotential model
Dynamic overpotential model
Thermal model
Constant temperature
Lumped thermal mass model
Cycling aging model
Equations
Temperature-independent table lookup
Temperature-dependent table lookup
Calendar aging model
Resistance aging model
Capacity aging model
Faults model
Short model
Open-circuit model
Exothermic reactions model
Electrical Model
The Battery Equivalent Circuit block models the battery terminal voltage by using a combination of electrical circuit elements arranged in a specific circuit topology. This figure shows the equivalent circuit topology, which relies on variable resistances, variable capacitances, and a variable voltage source. However, the implementation of the Battery Equivalent Circuit block is completely in the Simscape language.
All the circuit elements have variable characteristics that are functions of other battery states:
OpenCircuitVoltage — The block tabulates this circuit element as a function of the SOC. If you set the Thermal model parameter to
Constant temperature
orLumped thermal mass
, this circuit element also depends on the 2-D lookup temperature. If you set the Hysteresis model parameter toOne-state model
, then the voltage source value is a function of the previous charge or discharge history of the battery.R0, R1, R2, R3, Tau1, Tau2, Tau3 — The block tabulates this circuit element as a function of the SOC. If you set the Thermal model parameter to
Constant temperature
orLumped thermal mass
, this circuit element also depends on the 2-D lookup temperature. If you set the Current directionality for resistance parameters parameter toEnabled
, then the resistance and capacitance values are also functions of the instantaneous current charge or discharge direction. Therefore, you can use charge and discharge parameter tables if they are available. If the current flowing through the battery is positive, then the block uses the charge lookup table parameters. If the current flowing through the battery is negative, then the block uses the discharge lookup table parameters.SelfDischargeResistor — If you set the Thermal model parameter to
Constant temperature
orLumped thermal mass
, this circuit element also depends on the 2-D lookup temperature.
Note
For all the table-based parameters, the Battery Equivalent
Circuit block supports linear interpolation only. For
extrapolation, set the Extrapolation method for all tables
parameter to Nearest
,
Linear
, or Error
.
For rows and columns, the extrapolation follows the row-column convention, in which rows are indexed before columns.
The Battery Equivalent Circuit calculates the terminal voltage of the battery at every time step by solving the Kirchhoff's voltage law
where:
U is the battery terminal voltage.
is the hysteresis-adjusted open-circuit voltage. The software updates the battery state of charge SOC, the temperature T, and the corresponding variables that depend on them at every time step during the simulation.
OCV(SOC,T) is the open-circuit voltage.
Uhyst(SOC,T) is the hysteresis voltage.
is the instantaneous overpotential. The software updates the battery SOC, the temperature, and the current directionality CurDir, as well as the corresponding variables that depend on them, at every time step during the simulation.
I is the battery current. If the value of I is positive, the block uses the charge lookup table parameters. If the value of I is negative, the block uses the discharge lookup table parameters.
is the dynamic overpotential. This optional term depends on the number of parallel resistor-capacitor pairs. This number can vary between 1 and 3. The software updates the battery SOC, temperature, and current directionality, as well as the corresponding variables that depend on them, at every time step during the simulation.
ΔURCi is the voltage drop for parallel resistor-capacitor pair i. The block calculates the voltage drop using this ordinary differential equation:
For the Battery Equivalent Circuit block, I has a negative sign during discharge and a positive sign during charge. During discharge, the block subtracts the battery overpotentials from the open-circuit voltage value, lowering the terminal voltage of the battery. In the discharge and charge cases, the overpotentials dissipate energy as heat. This figure shows the evolution of the battery overpotentials during a battery pulse discharge. The dynamic overpotential from the resistor-capacitor pairs increases slowly over the pulse, as opposed to the instantaneous overpotential, which increases during the first few milliseconds.
Batteries do not respond instantaneously to load changes. They require some time to achieve a steady state. This time-varying property is a result of the battery charge dynamics. The block models the charge dynamics by using parallel RC sections in the equivalent circuit.
To model the battery charge dynamics, set the Parallel resistor capacitor pairs parameter to one of these values:
No dynamics
— The equivalent circuit contains no parallel RC sections. The battery exhibits no delay between terminal voltage and internal charging voltage.One time-constant dynamics
— The equivalent circuit contains one parallel RC section.Two time-constant dynamics
— The equivalent circuit contains two parallel RC sections.Three time-constant dynamics
— The equivalent circuit contains three parallel RC sections.
This diagram shows the battery equivalent circuit for the block circuit topology with only two time-constant dynamics and no self-discharge resistance.
In this figure:
R1 and R2 are the parallel RC resistances. Specify these values by setting the First polarization resistance, R1(SOC,T) and Second polarization resistance, R2(SOC,T) parameters, respectively, if you tabulate parameters over temperature. Otherwise, specify these values by setting the First polarization resistance, R1(SOC) and Second polarization resistance, R2(SOC) parameters, respectively. The voltage drop of the first RC pair is directly related to the activation overpotential from the chemical reaction at the interface of the electrodes. The time constant τ1 for this dynamic is typically lower than τ2, which indicates a faster response or faster dynamics. The voltage drop of the second RC pair is related to concentration overpotentials and typically evolves more slowly than the activation overpotential.
C1 and C2 are the parallel RC capacitances. The time constant τ for each parallel section relates the R and C values through the relationship . Specify τ for each section by using the First time constant, tau1(SOC,T) and Second time constant, tau2(SOC,T) parameters if you tabulate parameters over temperature or First time constant, tau1(SOC) and Second time constant, tau2(SOC) otherwise.
R0 is the instantaneous resistance. Specify this value with the Instantaneous resistance, R0(SOC,T) parameter if you tabulate parameters over temperature or Instantaneous resistance, R0(SOC) otherwise.
Note
The charge dynamics parameters can also depend on the current
directionality. If you set the Current directionality for
resistance parameters to Enabled
,
the parameters in the Overpotential section change
accordingly.
The Battery Equivalent Circuit block calculates the SOC of the battery with the Coulomb counting method:
where:
Caged is the aged capacity of the cell.
ID,SD is the self-discharge current drain. This equation gives the current drain from the self-discharge resistor, which you can tabulate as a function of temperature T:
RSD(T) is the self-discharge resistance.
OCVinternal is the internal open-circuit voltage.
The Battery Equivalent Circuit block calculates the battery heat generation rate by adding these quantities:
Power dissipation terms from all the resistors in the equivalent circuit topology. This term is also called the irreversible heat generation. This quantity contains ohmic and activation overpotential heat terms.
Reversible heat generation from entropy
Heat generation terms from the faulted cell behaviour:
Short resistance (or parallel-added resistance)
Open-circuit resistance (or series-added resistance)
Thermal runaway reaction heat
This equation shows this summation:
where:
is the heat generation rate.
is the dissipated power.
Qflow,series is the series resistor heat flow.
Qflow,parallel is the parallel resistor heat flow.
is the reversible heat.
Qflow,exr is the exothermic reaction heat flow. For more information, see Faults.
The hysteresis of a battery describes the dependency of the open-circuit voltage (OCV) on the charge or discharge history. Hysteresis is only indirectly dependent on the OCV.
The data obtained from measuring the OCV during a complete charging or discharging cycle is called a major loop. If the battery is only partially charged or discharged, the measured OCV forms a minor loop. The minor loops approach the major loops after a delay in charge. This effect is prominent in Li-ion batteries and it has a significant effect on the SOC estimation.
The Battery Equivalent Circuit block models the hysteresis by using a one-state model
where:
Uhyst is the hysteresis voltage.
H defines the hysteresis state. The block uses this ordinary differential equation to calculate the hysteresis state:
γ is the hysteresis rate.
Caged is the aged capacity of the cell.
M is the value of the Maximum hysteresis voltage, MaximumHysteresisVoltage(SOC,T) parameter if you tabulate the parameters over temperature, or Maximum hysteresis voltage, MaximumHysteresisVoltage(SOC) otherwise.
M0 is the value of the Instantaneous hysteresis voltage, InstantaneousHysteresisVoltage(SOC,T) parameter if you tabulate the parameters over temperature, or Instantaneous hysteresis voltage, InstantaneousHysteresisVoltage(SOC) otherwise.
For more information on hysteresis and on how to model it, see the Model Voltage Hysteresis in Battery example.
When the battery terminals are open-circuit, internal currents can still
discharge the battery. This behavior is called self-discharge. To enable and
model this effect, set the Self discharge parameter to
Enabled
.
The block models these internal currents with a temperature-dependent resistance RSD(T) across the terminals of the fundamental battery model. Specify the lookup values for this resistance by using the Self-discharge resistance, SelfDischargeR(T) parameter if you tabulate the parameters over temperature, or Self-discharge resistance, SelfDischargeR otherwise.
Thermal Model
Setting the Thermal model parameter to Lumped
thermal mass
adds a thermal model to the Battery
Equivalent Circuit block. This model computes the battery
temperature at every time step. The block uses this temperature for all
temperature-dependent lookup tables. The lumped thermal mass adds this ordinary
differential equation:
where:
Mth is the battery thermal mass.
is the heat across the H thermal port.
To increase the fidelity of the thermal
modeling and to model the thermal gradient inside the block, you can discretize the
thermal model along the cell height. To height-discretize the thermal model, set the
Thermal model parameter to Height distributed
thermal mass
. The block then exposes the
HDist thermal port, which is an array of thermal nodes that
represents the nodes along the height of the cell. To compute the electrical
behavior of the cell, the block uses the mean of the discretized thermal
nodes. (since R2024b)
Cycling Aging Model
Battery aging is the deterioration of the battery performance over repeated charge and discharge cycles.
When you set the Cycling aging model parameter to
Equations
, the open-circuit voltage across the
fundamental battery model fades proportionally with the number of discharge cycles
n:
where δOCV(N,T) is the percentage change in open-circuit voltage after N discharge cycles. Specify δOCV(N,T) by using the Change in open-circuit voltage after NumDisCycles discharge cycles (%) parameter.
Note
The Battery Equivalent Circuit block tracks the current and integrates it over time. The number of discharge cycles n increases by 1 every time an equivalent cell discharge capacity is extracted.
The nominal charge, from which the block calculates the SOC, fades with the square root of the number of discharge cycles:
where C is the initial capacity and δC(N,T) is the percentage change in capacity after N discharge cycles. Specify δC(N,T) by using the Change in capacity after NumDisCycles discharge cycles (%) parameter.
All resistances in the battery model also fade with the square root of the number of discharge cycles:
where δRi(N,T) is the percentage change in the ith resistance after N discharge cycles. Specify δRi(N,T) by using the Change in resistance after NumDisCycles discharge cycles (%) parameter.
Depending on how you configure the block, the resistances include these values:
Instantaneous resistance — Specify the percentage change over NumDisCycles cycles using the Change in instantaneous resistance after NumDisCycles discharge cycles (%) parameter.
Self-discharge resistance — Specify the percentage change over NumDisCycles cycles using the Change in self-discharge resistance after NumDisCycles discharge cycles (%) parameter.
First charge dynamics resistance — Specify the percentage change over NumDisCycles cycles using the Change in first polarization resistance after NumDisCycles discharge cycles (%) parameter.
Second charge dynamics resistance — Specify the percentage change over NumDisCycles cycles using the Change in second polarization resistance after NumDisCycles discharge cycles (%) parameter.
Third charge dynamics resistance — Specify the percentage change over NumDisCycles cycles using the Change in third polarization resistance after NumDisCycles discharge cycles (%) parameter.
Note
You can also model the battery cycling aging characteristic by using the temperature-dependent or temperature-independent lookup tables. Choosing one of these options changes the block parameters accordingly.
Calendar Aging Model
You can model the battery performance deterioration that occurs when the battery is not in use. Calendar aging affects the internal resistance and the capacity. In particular, the resistance increase varies by mechanisms such as the creation of a solid-electrolyte interface (SEI) at the anode and cathode and the corrosion of the current collector. These processes mainly depend on the storage temperature, the storage SOC, and storage time.
To model calendar aging in the Battery Equivalent Circuit block,
set one of the Resistance calendar aging or Capacity
calendar aging parameters to Enabled
and
then set the Modeling option parameter to one of these values:
Equation-based
Tabulated: temperature
Tabulated: time and temperature
Note
The Battery Equivalent Circuit block applies the calendar aging
only during initialization. When you set the Resistance calendar
aging or Capacity calendar aging parameter
to Enabled
, the block exposes the Vector of
time intervals parameter, which represents the time over which
the battery ages before the start of the simulation. This option does not
include calendar aging during the simulation.
These equations define the terminal resistance increase of the battery due to calendar aging:
where:
Voc is the Normalized open-circuit voltage during storage, V/Vnom parameter.
R0 is the Internal resistance parameter.
ti is the time sample derived from the Vector of time intervals parameter.
Ti is derived from the Temperature breakpoints, T parameter.
bR is the Terminal resistance linear scaling for voltage, b parameter.
cR is the Terminal resistance constant offset for voltage, c parameter.
dR is the Terminal resistance temperature-dependent exponential increase, d parameter.
aR is the Terminal resistance time exponent, a parameter.
q is the electron elementary charge, in C.
k is the Boltzmann constant, in J/K.
These equations define the capacity decrease of the battery due to calendar aging:
where:
C is the initial capacity.
bC is the Capacity linear scaling for voltage, b parameter.
cC is the Capacity constant offset for voltage, c parameter.
dC is the Capacity temperature-dependent exponential increase, d parameter.
aC is the Capacity time constant, a parameter.
If you set the Storage condition parameter to
Specify state-of-charge during storage
, the block
converts the SOC during storage into the normalized open-circuit voltage by
using the tabulated voltage V0
against the SOC and the temperature during storage.
The aged terminal resistance is the product of the terminal resistance, R0(SOC,T), the percentage resistance increase, dR0, and the power law that describes the time dependence of the calendar aging:
where:
T is the battery temperature. Specify the T breakpoints using the Temperature breakpoints, T parameter if you tabulate the parameters over temperature.
Tst is the Vector of storage temperatures parameter.
tst,i and tst,i-1 are the time samples derived from the Vector of time intervals parameter.
t0 is 0.
tst,m is the moment at which the software measures the resistance increase, dR0.
The same equation applies to the calculation of the aged battery capacity.
The aged terminal resistance is the product of the terminal resistance, R0(SOC,T) and dR0:
The same equation applies to the calculation of the aged battery capacity.
Faults
The Battery Equivalent Circuit block supports three different types of fault:
Additional resistance fault — The resistance of a series-connected resistor ranges from a value of 0 ohm to a value that you specify. You can use this fault to model an open-circuit cell when the additional series-connected resistance is high (greater than 1000 ohm), or an abnormal internal resistance.
Internal short fault — The resistance of a parallel-connected resistor ranges from an infinite value to a value that you specify.
Exothermic reactions — Use this fault to simulate a thermal runaway event. Heat-releasing chemical reactions occur at the cell level. At low temperatures, the rate of reaction is low and the self-heating rate is not significant. At higher temperatures, the rate of exothermic reactions increases exponentially. The battery generates more heat than the amount it can dissipate. The temperature starts to rise exponentially, reaches a thermal runaway event, and the cell starts to burn. During the burn, the cell electrical behavior is equivalent to an open circuit.
The released heat rate is a function of the extent of the reaction and the cell temperature:
where:
Kscale is a constant that scales the equation to define how fast the reaction advances.
ξ is the reaction extent. If the reaction extent is 0, the reaction has not started. If the reaction extent is 1, the reaction has consumed all possible reactants and is completed.
ρ is the value of the Order of reaction parameter and defines the polynomial dependency of the reaction rate with respect to the extent of reaction.
is the Arrhenius equation and defines the temperature dependency. Ea is the activation energy, in kJ/mol, and R is equal to 8.314 J/k/mol.
The block computes Kscale by using the Exotherm onset temperature parameter. The exotherm onset temperature is the temperature in an accelerating rate calorimetry (ARC) test at which the self-heating rate exceeds a threshold of 0.02 celsius per minute at which the reaction heat rate slowly increases the cell temperature. If the temperature exceeds this value, the reaction becomes self-sustaining and eventually produces the runaway event.
In an ARC test, the released heat rate at the exothermic onset is equal to:
where:
TEO is the exothermic onset temperature in Kelvin.
Mth,cell is the thermal mass of the cell.
dTdtEO is the rate of change of the cell temperature when the cell is at the exothermic onset temperature. The typical value is 0.02 celsius per minute.
You can then compute Kscale as a function of dTdtEO, TEO, the thermal mass of the cell, and the activation energy:
As the reaction advances, some of the materials in the battery decompose into gases. These gases dissipate into the environment. The loss of these materials decreases the thermal mass of the battery. To model this loss of thermal mass, the thermal mass decreases linearly with the reaction extent. To control the rate of thermal mass decrease with reaction extent, specify the Percent of thermal mass vented parameter accordingly.
To model a fault in the Battery Equivalent Circuit block, in the Faults section, click the Add fault hyperlink in the parameter that corresponds to the fault that you want to model. When the Create Fault window opens, use it to specify the fault properties. For more information about fault modeling, see Fault Behavior Modeling and Fault Triggering.
Predefined Parameterization
You can parameterize the Battery Equivalent Circuit block by using built-in parameterizations that represent components from specific suppliers.
These parameterizations model the steady-state electrical parameters of a battery. The software parameterizes the Open-circuit voltage (SOC), Instantaneous resistance, R0(SOC, T), Battery capacity, Percentage change in cell capacity, CapacityChange(N), and Percentage change in open-circuit voltage, OCVChangeVec(N) parameters from characteristic curves in the manufacturer datasheets. The software does not parameterize the change in series resistance with the battery cycle life and the dynamic RC network parameters. Instead, the software sums the net resistance of the RC network resistors to the series resistance of the specific parameterized data. To populate the RC parameter data, subtract the net RC network resistance from the series resistance data. The software estimates the battery thermal mass by assuming a value of 900 J/kg K for the specific heat of the battery. The thermal mass is then equal to 900 times the weight of the battery in the manufacturer datasheet.
The available data corresponds to a 1 C discharge current for different temperatures up to the minimum terminal voltage in the datasheet. The software extrapolates the data below the minimum terminal voltage. The Open-circuit voltage, OCV(SOC) parameter is temperature-independent. At lower temperatures, in the low-SOC region, the terminal resistances are constant and equal to the value of the resistance at the minimum terminal voltage. In this regime, batteries often experience higher thermal losses.
To load a predefined parameterization, double-click the Battery Equivalent Circuit block, click the <click to select> hyperlink of the Selected part parameter, and, in the Block Parameterization Manager window, select the part you want to use from the list of available components.
Note
The predefined parameterizations of Simscape™ components use available data sources for the parameter values. Engineering judgement and simplifying assumptions are used to fill in for missing data. As a result, expect deviations between simulated and actual physical behavior. To ensure accuracy, validate the simulated behavior against experimental data and refine component models as necessary.
For more information about predefined parameterization and for a list of the available components, see List of Pre-Parameterized Components (Simscape Electrical).
Variables
To set the priority and initial target values for the block variables before simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.
Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. You can specify nominal values using different sources, including the Nominal Values section in the block dialog box or Property Inspector. For more information, see System Scaling by Nominal Values.
Public Variables (Visible with Probe Block)
The Battery Equivalent Circuit block comprises these public variables that you can probe using the Probe block:
batteryCurrent
— Total current measured through the battery terminals. By default, this variable has units of Amperes.batteryTemperature
— Battery average temperature that the block uses for the table look-up of resistances and open-circuit voltage. If you set the Thermal model parameter toConstant temperature
, then thebatteryTemperature
variable is equal to the specified temperature value. If you set the Thermal model parameter toLumped thermal mass
, then thebatteryTemperature
variable is a differential state that varies during the simulation.batteryVoltage
— Battery terminal voltage, or the voltage difference between the positive and the negative terminals. By default, this variable has units of Volts.charge
— Electrical charge drawn from or added to the battery. By default, this variable has units of A*h.heatGenerationRate
— Total battery heat generation rate. The block calculates the heat generation rate by adding up all resistive losses, reversible heating contribution, and the exothermic reaction heat if you enabled an exothermic fault. By default, this variable has units of Watts.hysteresisState
— Hysteresis state in the range [-1,1]. A value of 1 indicates that the block is using the charge open-circuit voltage curve at that time step. A value of -1 indicates that the block is using the discharge open-circuit voltage curve at that time step. By default, this variable is unitless.isCurrentInterruptionTempExceeded
— Boolean that indicates whether the battery has exceeded its current interruption temperature during a thermal runaway event. This variable is relevant only when modeling faults.isExothermFaulted
— Boolean that indicates whether the battery model has transitioned into a thermal runaway or exothermic mode. This mode can be triggered by high temperature or timed based on the fault model specification. This variable is relevant only when modeling faults.numCycles
— Equivalent number of discharge cycles of the battery. The counter starts at zero and increases by one every time an equivalent discharge charge has been drawn from the battery. By default, this variable is unitless.ocv
— Open-circuit voltage of the battery adjusted for temperature, ageing, and state of charge. By default, this variable has units of Volts.power_dissipated
— Resistive heat generation rate or dissipated power. By default, this variable has units of Watts.reactionExtent
— Exothermic reaction progression in the range [0,1]. Initially, the value of this variable is 0. This variable is relevant only when modeling faults.reactionHeatRate
— Exothermic reaction heat, if you enabled an exothermic fault. By default, this variable has units of Watts.reversibleHeat
— Reversible heating contribution from entropy changes. By default, this variable has units of Watts.stateOfCharge
— Battery state of charge obtained from coulomb counting. By default, this variable is unitless.voltageDropRC1
— Voltage drop that the first RC branch of the equivalent circuit model causes. By default, this variable has units of Volts.voltageDropRC2
— Voltage drop that the second RC branch of the equivalent circuit model causes. By default, this variable has units of Volts.voltageDropRC3
— Voltage drop that the third RC branch of the equivalent circuit model causes. By default, this variable has units of Volts.
Examples
Ports
Conserving
Parameters
References
[1] Zhang, Ran, and Zhengqiang Pan. “Model Identification of Lithium-Ion Batteries Considering Current-Rate Effects on Battery Impedance.” In 2019 4th International Conference on Power and Renewable Energy (ICPRE), 305–9. Chengdu, China: IEEE, 2019. https://doi.org/10.1109/ICPRE48497.2019.9034704R.
[2] Baronti, Federico, Nicola Femia, Roberto Saletti, Ciro Visone, and Walter Zamboni. “Hysteresis Modeling in Li-Ion Batteries.” IEEE Transactions on Magnetics 50, no. 11 (November 2014): 1–4. https://doi.org/10.1109/TMAG.2014.2323426
[3] Baronti, F., W. Zamboni, N. Femia, R. Roncella, and R. Saletti. “Experimental Analysis of Open-Circuit Voltage Hysteresis in Lithium-Iron-Phosphate Batteries.” In IECON 2013 - 39th Annual Conference of the IEEE Industrial Electronics Society, 6728–33, 2013. https://doi.org/10.1109/IECON.2013.6700246
[4] Ramadass, P., Bala Haran, Ralph White, and Branko N. Popov. “Mathematical Modeling of the Capacity Fade of Li-Ion Cells.” Journal of Power Sources 123, no. 2 (September 2003): 230–40. https://doi.org/10.1016/S0378-7753(03)00531-7
[5] Ning, Gang, Bala Haran, and Branko N. Popov. “Capacity Fade Study of Lithium-Ion Batteries Cycled at High Discharge Rates.” Journal of Power Sources 117, no. 1–2 (May 2003): 160–69. https://doi.org/10.1016/S0378-7753(03)00029-6
[6] Plett, Gregory L. Battery Management Systems. Volume I, Battery Modeling. Artech House, 2015.