Simple battery model

**Library:**Simscape / Power Systems / Simscape Components / Sources

The Battery block represents a simple battery model. For information on how you can create a detailed battery model, see the Lead-Acid Battery (Simscape).

The Battery block has four modeling variants,
accessible by right-clicking the block in your block diagram and then
selecting the appropriate option from the context menu, under **Simscape** > **Block
choices**:

**Uninstrumented | No thermal port**(default) — Basic model that does not output battery charge level or simulate thermal effects.**Uninstrumented | Show thermal port**— Model with exposed thermal port. This model does not measure internal charge level of the battery.**Instrumented | No thermal port**— Model with exposed charge output port. This model does not simulate thermal effects.**Instrumented | Show thermal port**— Model that lets you measure internal charge level of the battery and simulate thermal effects. Both the thermal port and the charge output port are exposed.

The instrumented variants have an extra physical signal port that outputs the internal state of charge. Use this functionality to change load behavior as a function of state of charge, without the complexity of building a charge state estimator.

The thermal port variants expose a thermal port, which represents the battery thermal mass. When you select this option, provide additional parameters to define battery behavior at a second temperature. For more information, see Modeling Thermal Effects.

If you select `Infinite`

for the **Battery
charge capacity** parameter, the block models the battery
as a series resistor and a constant voltage source. If you select `Finite`

for
the **Battery charge capacity** parameter, the block
models the battery as a series resistor and a charge-dependent voltage
source whose voltage as a function of charge has the following reciprocal
relationship:

$V={V}_{0}\left[1-\frac{\alpha (1-x)}{1-\beta (1-x)}\right]$

where:

*x*is the ratio of current charge to rated battery capacity in ampere-hours (AH).*V*_{0}is the voltage when the battery is fully charged, as defined by the**Nominal voltage**parameter.The block calculates the constants

*α*and*β*to satisfy these battery conditions:The battery voltage is zero when the charge is zero, that is, when

*x*= 0.When

*x*=*AH1*/*AH*, that is, when the charge is the value of the**Charge AH1 when no-load volts are V1**parameter, the battery voltage is*V1*(the**Voltage V1 < Vnom when charge is AH1**parameter value).

The equation defines a reciprocal relationship between voltage and remaining charge. It approximates a real battery, but it does replicate the increasing rate of voltage drop at low charge values. It also ensures that the battery voltage becomes zero when the charge level is zero. This simple model has the advantage of requiring few parameters, and these parameters are readily available on most datasheets.

For battery models with finite battery charge capacity, you
can model battery performance deterioration depending on the number
of discharge cycles, which is sometimes referred to as battery fade.
To enable battery fade, set the **Model battery fade?** parameter
to `Include`

. This setting exposes additional
parameters in the **Fade** section.

The block implements battery fade by scaling certain battery
parameter values that you specify in the **Main** section,
depending on the number of completed discharge cycles. The block uses
multipliers *λ*_{AH}, *λ*_{R1},
and *λ*_{V1} on the **Ampere-hour
rating**, **Internal resistance**, and **Voltage
V1 < Vnom when charge is AH1** parameter values, respectively.
These multipliers, in turn, depend on the number of discharge cycles:

$${\lambda}_{AH}=1-{k}_{1}{N}^{0.5}$$

$${\lambda}_{R1}=1+{k}_{2}{N}^{0.5}$$

$${\lambda}_{V1}=1-{k}_{3}N$$

$$N={N}_{0}+\frac{1}{AH}{\displaystyle \underset{0}{\overset{t}{\int}}\frac{i\left(t\right)\cdot H\left(i\left(t\right)\right)}{{\lambda}_{AH}\left(t\right)}dt}$$

where:

*λ*_{AH}is the multiplier for battery nominal capacity.*λ*_{R1}is the multiplier for battery series resistance.*λ*_{V1}is the multiplier for voltage*V1*to scale for a number of discharge cycles when the charge is*AH1*.*N*is the number of discharge cycles completed.*N*_{0}is the number of full discharge cycles completed before the start of the simulation.*AH*is the rated battery capacity in AH.*i(t)*is the instantaneous battery output current.*H(i(t))*is the Heaviside function of the instantaneous battery output current. This function returns 0 if the argument is negative, and 1 if the argument is positive.

The block calculates the coefficients *k*_{1}, *k*_{2},
and *k*_{3} by substituting the
parameter values you provide in the **Fade** section
into these battery equations. For example, the default set of block
parameters corresponds to the following coefficient values:

*k*_{1}= 1e-2*k*_{2}= 1e-3*k*_{3}= 1e-3

You can also define a starting point for a simulation based
on the previous charge-discharge history by using the high-priority
variable **Discharge cycles**. For more information,
see Variables.

For thermal variants of the block, you provide additional parameters to define battery behavior at a second temperature. The extended equations for the voltage when the thermal port is exposed are:

$$V={V}_{0T}\left[1-\left(\frac{{\alpha}_{T}(1-x)}{1-{\beta}_{T}(1-x)}\right)\right]$$

$${\alpha}_{T}=\alpha \left(1+{\lambda}_{\alpha}\left(T-{T}_{1}\right)\right)$$

$${\beta}_{T}=\beta \left(1+{\lambda}_{\beta}\left(T-{T}_{1}\right)\right)$$

$${V}_{0T}={V}_{0}\left(1+{\lambda}_{V}\left(T-{T}_{1}\right)\right)$$

where:

*T*is the battery temperature.*T*_{1}is the temperature at which nominal values for*α*and*β*are provided.*λ*_{α},*λ*_{β}, and*λ*_{V}are the parameter temperature dependence coefficients for*α*,*β*, and*V*_{0}, respectively.

The internal series resistance (*R*_{1})
and self-discharge resistance (*R*_{2})
also become functions of temperature:

$$\begin{array}{l}{R}_{1T}={R}_{1}\left(1+{\lambda}_{R1}\left(T-{T}_{1}\right)\right)\\ {R}_{2T}={R}_{2}\left(1+{\lambda}_{R2}\left(T-{T}_{1}\right)\right)\end{array}$$

where *λ*_{R1} and *λ*_{R2} are
the parameter temperature dependence coefficients. All the temperature
dependence coefficients are determined from the corresponding values
you provide at the nominal and second measurement temperatures.

The battery temperature is determined from:

$${M}_{th}\dot{T}={i}^{2}{R}_{1T}+{V}^{2}/{R}_{2T}$$

*M*_{th}is the battery thermal mass.*i*is the battery output current.

Use the **Variables** tab to set the priority
and initial target values for the block variables before simulation.
For more information, see Set Priority and Initial Target for Block Variables (Simscape) .

Unlike block parameters, variables do not have conditional visibility.
The **Variables** tab lists all the existing block
variables. If a variable is not used in the set of equations corresponding
to the selected block configuration, the values specified for this
variable are ignored.

When you model battery fade, the **Discharge cycles** variable
lets you specify the number of charge-discharge cycles completed before
the start of simulation. For more information, see Modeling Battery Fade. If you omit battery
fade modeling, this variable is not used by the block.

The self-discharge resistance is assumed not to depend strongly on the number of discharge cycles.

For the thermal variant of the battery, you provide fade data only for the reference temperature operation. The block applies the same derived

*λ*_{AH},*λ*_{R1}, and*λ*_{V1}multipliers to parameter values corresponding to the second temperature.When using the thermal block variants, use caution when operating at temperatures outside of the temperature range bounded by the

**Measurement temperature**and**Second temperature measurement**values. The block uses linear interpolation for the derived equation coefficients, and simulation results might become nonphysical outside of the specified range. The block checks that the internal series resistance, self-discharge resistance, and nominal voltage always remain positive, and issues error messages if there is a violation.

[1] Ramadass, P., B. Haran, R. E. White,
and B. N. Popov. “Mathematical modeling of the capacity fade
of Li-ion cells.” *Journal of Power Sources*.
123 (2003), pp. 230–240.

[2] Ning, G., B. Haran, and B. N. Popov.
“Capacity fade study of lithium-ion batteries cycled at high
discharge rates.” *Journal of Power Sources*.
117 (2003), pp. 160–169.

Was this topic helpful?