Implement generic battery model

Electric Drives/Extra Sources

The Battery block implements a generic dynamic model parameterized to represent most popular types of rechargeable batteries.

The equivalent circuit of the battery is shown below:

$${f}_{1}\left(it,i*,i,Exp\right)={E}_{0}-K\cdot \frac{Q}{Q-it}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+{\text{Laplace}}^{-1}\left(\frac{Exp(s)}{Sel(s)}\cdot 0\right).$$

$${f}_{2}\left(it,i*,i,Exp\right)={E}_{0}-K\cdot \frac{Q}{it+0.1\cdot Q}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+{\text{Laplace}}^{-1}\left(\frac{Exp(s)}{Sel(s)}\cdot \frac{1}{s}\right).$$

$${f}_{1}\left(it,i*,i\right)={E}_{0}-K\cdot \frac{Q}{Q-it}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+A\cdot \mathrm{exp}\left(-B\cdot it\right).$$

$${f}_{2}\left(it,i*,i\right)={E}_{0}-K\cdot \frac{Q}{it+0.1\cdot Q}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+A\cdot \mathrm{exp}\left(-B\cdot it\right).$$

$${f}_{1}\left(it,i*,i,Exp\right)={E}_{0}-K\cdot \frac{Q}{Q-it}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+{\text{Laplace}}^{-1}\left(\frac{Exp(s)}{Sel(s)}\cdot 0\right).$$

$${f}_{2}\left(it,i*,i,Exp\right)={E}_{0}-K\cdot \frac{Q}{\left|it\right|+0.1\cdot Q}\cdot i*-K\cdot \frac{Q}{Q-it}\cdot it+{\text{Laplace}}^{-1}\left(\frac{Exp(s)}{Sel(s)}\cdot \frac{1}{s}\right),$$

where,

E_{Batt} = Nonlinear voltage (V)

E_{0} = Constant voltage (V)

Exp(s) = Exponential zone dynamics (V)

Sel(s) = Represents the battery mode. Sel(s) = 0 during battery discharge, Sel(s) = 1 during battery charging.

K = Polarization constant (Ah^{−1})
or Polarization resistance (Ohms)

i* = Low frequency current dynamics (A)

i = Battery current (A)

it = Extracted capacity (Ah)

Q = Maximum battery capacity (Ah)

A = Exponential voltage (V)

B = Exponential capacity (Ah)^{−1}

The parameters of the equivalent circuit can be modified to represent a particular battery type, based on its discharge characteristics. A typical discharge curve is composed of three sections, as shown in the next figure:

The first section represents the exponential voltage drop when the battery is charged. Depending on the battery type, this area is more or less wide. The second section represents the charge that can be extracted from the battery until the voltage drops below the battery nominal voltage. Finally, the third section represents the total discharge of the battery, when the voltage drops rapidly.

When the battery current is negative, the battery will recharge following a charge characteristic as shown below:

Note that the parameters of the model are deduced from discharge characteristics and assumed to be the same for charging.

The Exp(s) transfer function represents the hysteresis phenomenon for the Lead-Acid, NiCD and NiMH batteries during charge and discharge cycles. The exponential voltage increases when battery is charging, no matter the SOC of the battery. When the battery is discharging, the exponential voltage decreases immediately:

For the lithium-ion battery type, the impact of temperature on the model parameters is represented by the equations

${f}_{1}(it,i*,i,T,{T}_{a})={E}_{0}(T)-K(T)\cdot \frac{Q({T}_{a})}{Q({T}_{a})-it}\cdot \left(i*+it\right)+A\cdot \mathrm{exp}\left(-B\cdot it\right)-C\cdot it$

${V}_{batt}(T)={f}_{1}(it,i*,i,T,{T}_{a})-R(T)\cdot i$

${f}_{1}(it,i*,i,T,{T}_{a})={E}_{0}(T)-K(T)\cdot \frac{Q({T}_{a})}{it+0.1\cdot Q({T}_{a})}\cdot i*-K(T)\cdot \frac{Q({T}_{a})}{Q({T}_{a})-it}\cdot it+A\cdot \mathrm{exp}\left(-B\cdot it\right)-C\cdot it$

${V}_{batt}(T)={f}_{1}(it,i*,i,T,{T}_{a})-R(T)\cdot i,$

with

${E}_{0}(T)={E}_{0}|{}_{{T}_{ref}}+\frac{\partial E}{\partial T}\left(T-{T}_{ref}\right)$

$K(T)=K|{}_{{T}_{ref}}\cdot \mathrm{exp}\left(\alpha \left(\frac{1}{T}-\frac{1}{{T}_{ref}}\right)\right)$

$Q({T}_{a})=Q|{}_{{T}_{a}}+\frac{\Delta Q}{\Delta T}\cdot \left({T}_{a}-{T}_{ref}\right)$

$R(T)=R|{}_{{T}_{ref}}\cdot \mathrm{exp}\left(\beta \left(\frac{1}{T}-\frac{1}{{T}_{ref}}\right)\right),$

where:

*T _{ref}* = Nominal ambient
temperature (K)

*T* = Cell or internal temperature (K)

*T _{a}* = Ambient temperature
(K)

*E*/*T* = Reversible voltage
temperature coefficient (*V*/*K*)

α = Arrhenius rate constant for the polarization resistance

β= Arrhenius rate constant for the internal resistance

Δ*Q*/Δ*T* = Maximum
capacity temperature coefficient (Ah/*K*)

*C* = Nominal discharge curve slope (*V*/Ah).
For lithium-ion batteries with less pronounced discharge curves (such
as lithium iron phosphate batteries), this parameter is set to zero.

The cell or internal temperature (*T*) at any
given time (*t*) is expressed as:

$T(t)={L}^{-1}\left(\frac{{P}_{loss}{R}_{th}+{T}_{a}}{1+s\cdot {t}_{c}}\right),$

where:

*R _{th}* = Thermal resistance,
cell to ambient (°C/W)

*t _{c}* = Thermal time
constant, cell to ambient (s)

*P _{loss}* is the overall
heat generated (W) during charge/discharge process and is given by

${P}_{loss}=\left({E}_{0}(T)-{V}_{batt}(T)\right)\cdot i+\frac{\partial E}{\partial T}\cdot i\cdot T.$

**Type**Provides a set of predetermined charge behavior for four types of battery:

`Lead-Acid`

`Lithium-Ion`

`Nickel-Cadmium`

`Nickel-Metal-Hydride`

**Simulate temperature effects**When you select this parameter, the

**Temperature**tab becomes visible and displays the thermal model parameters. The Ta input port becomes visible to supply the ambient temperature. The**Simulate temperature effects**parameter is visible only if the**Type**parameter is set to`Lithium-Ion`

.**Use a preset battery**The parameter contains a list of 10 predetermined temperature parameters of typical lithium-ion batteries. The parameters in the

**Temperature**tab are not accessible when a preset is selected. The**Use a preset battery**parameter is visible only if the**Type**parameter is set to`Lithium-Ion`

and**Simulate temperature effects**is selected.**Nominal Voltage (V)**The nominal voltage (

*Vnom*) of the battery (volts). The nominal voltage represents the end of the linear zone of the discharge characteristics.**Rated Capacity (Ah)**The rated capacity (

*Qrated*) of the battery in ampere-hour. The rated capacity is the minimum effective capacity of the battery.**Initial State-Of-Charge (%)**The initial State-Of-Charge (SOC) of the battery. 100% indicates a fully charged battery and 0% indicates an empty battery. This parameter is used as an initial condition for the simulation and does not affect the discharge curve (when the option

**Plot Discharge Characteristics**is used).**Battery response time (s)**The response time of the battery (at 95% of the final value).

This value represents the voltage dynamics and can be observed when a current step is applied:

In this example, a battery response time of 30 secs is used.

**Determined from the nominal parameters of the battery**Load the corresponding parameters in the entries of the dialog box, depending on the selected

**Type**, the**Nominal Voltage**and the**Rated Capacity**.When a preset model is used, the detailed parameters cannot be modified. If you want to modify the discharge curve, select the desired battery type to load the default parameters, and then uncheck the

**Determined from the nominal parameters of the battery**checkbox to access the detailed parameters.**Maximum Capacity (Ah)**The maximum theoretical capacity (

*Q*), when a discontinuity occurs in the battery voltage. This value is generally equal to 105% of the rated capacity.**Cut-off Voltage (V)**The minimum allowable battery voltage (V). This voltage represents the end of the discharge characteristics. At the cut-off voltage, the battery is fully discharged.

**Fully charged Voltage (V)**The fully charged voltage (

*Vfull*), for a given discharge current. Note that the fully charged voltage is not the no-load voltage.**Nominal discharge current (A)**The nominal discharge current, for which the discharge curve has been measured. For example, a typical discharge current for a 1.5 Ah NiMH battery is 20% of the rated capacity: (0.2 * 1.5 Ah / 1h = 0.3A).

**Internal Resistance**The internal resistance of the battery (ohms). When a preset model is used, a generic value is loaded, corresponding to 1% of the nominal power (nominal voltage * rated capacity of the battery). The resistance is supposed to be constant during the charge and the discharge cycles and does not vary with the amplitude of the current.

**Capacity (Ah) @ Nominal Voltage**The capacity (

*Qnom*) extracted from the battery until the voltage drops under the nominal voltage. This value should be between*Qexp*and*Qmax*.**Exponential zone [Voltage (V), Capacity (Ah)]**The voltage (

*Vexp*) and the capacity (*Qexp*) corresponding to the end of the exponential zone. The voltage should be between*Vnom*and*Vfull*. The capacity should be between 0 and*Qnom*.**Plot**Plots a figure containing two graphs. The first graph represents the nominal discharge curve (at the

**Nominal Discharge Current**) and the second graph represents the discharge curves at the specified discharge currents.**Discharge current**Allows to specify different values of discharge current. The discharge characteristics for these currents are presented in the second part of the graph.

**Units**Choose either

`Time`

or`Ampere-hour`

as the*x*-axis for the plot.

This tab is visible only when the **Type** parameter
is set to `Lithium-Ion`

and **Simulate
temperature effect** is selected.

**Initial cell temperature**The initial cell or internal temperature of the battery, in Celsius.

**Nominal ambient temperature T1**The ambient temperature, in Celsius, at nominal condition of operation. It is assumed that all parameters provided in the

**Parameters**tab are obtained at this ambient temperature.**Second ambient temperature T2**The ambient temperature, in Celsius, at a second operating condition, preferably below the nominal ambient temperature.

**Maximum capacity**The maximum battery capacity, in amperes hour, at the second ambient temperature.

**Initial discharge voltage**The initial discharge voltage at the second ambient temperature, in volts, immediately when the discharge current is applied.

**Voltage at 90% maximum capacity**The discharge voltage, in volts, when 90% of the maximum capacity is used, at second ambient temperature.

**Exponential zone**The discharge voltage, in volts, and the capacity, in amperes hour, corresponding to the end of the exponential zone, at the second ambient temperature.

**Thermal resistance, cell-to-ambient**The total thermal resistance, in °C/W, between the cell and ambient points of measurement. It is assumed the cell temperature is equivalent to the average internal temperature of the battery.

**Thermal time constant, cell-to-ambient**The temperature response time constant, in seconds, between the cell and ambient points of measurement. You can obtain this value from the ambient temperature step response while the battery is in idle mode.

**Heat loss difference [charge vs. discharge] (W)**The power loss difference between charge and discharge (W), when the battery is charged and discharged at the same C-rate and ambient temperature.

The power loss difference (Δ

*P*) can be determined using the following expression:$$\Delta P=\frac{{t}_{c}({\theta}_{2}-{\theta}_{1})}{{R}_{th}}$$

*θ*and_{1}*θ*are the rates of change of the battery internal temperature (°C/s) during discharge and charge, respectively._{2}

This section gives an example of detailed parameters extracted from the Panasonic NiMH-HHR650D battery data sheet:

From the specification tables, we obtain the rated capacity and the internal resistance. The other detailed parameters are deduced from the Typical Discharge Characteristics plot:

Parameter | Value |
---|---|

Rated capacity | 6.5 Ah |

Internal Resistance | 2 mΩ |

Nominal Voltage | 1.18 V |

Rated Capacity | 6.5 Ah |

Maximum Capacity | 7 Ah (5.38 h * 1.3A) |

Fully Charged voltage | 1.39 V |

Nominal Discharge Current | 1.3 A |

Capacity @ Nominal Voltage | 6.25 Ah |

Exponential Voltage | 1.28 V |

Exponential Capacity | 1.3 Ah |

These parameters are approximate and depend on the precision of the points obtained from the discharge curve. A tool, called ScanIt (provided by amsterCHEM, http://www.amsterchem.com) can be used to extract values from data sheet curves.

The discharge curves (the dotted line curves in the following plots) obtained with these parameters are similar to the data sheet curves.

To represent temperature effects of lithium-ion battery type, an additional discharge curve at ambient temperature different from the nominal temperature is required along with the thermal response parameters. The latter are not usually provided on the battery data sheet and may require simple experiments. The following examples show parameters extracted from the A123 Li-iron-phosphate ANR26650M1 and the Panasonic Li-cobalt-oxide CGR 18650 AF battery data sheets.

The figure shows the A123 ANR26650M1 data sheet specifications, which includes the required discharge curve points, along with other required parameters.

From the data sheet, these parameters are derived for the A123 Li-ion temperature-dependent battery model:

Parameter | Value |
---|---|

Nominal voltage (c) | 3.22 V |

Rated capacity | 2.3 Ah |

Maximum capacity (d) | 2.3 Ah |

Fully charged voltage (a) | 3.7 V |

Nominal discharge current | 2.3 A |

Internal resistance | 10 mΩ |

Capacity @ nominal voltage (c) | 2.07 Ah |

Exponential zone (b) | [3.4 V, 0.23 Ah] |

Nominal ambient temperature | 25 oC |

Second ambient temperature | 0 oC |

Maximum capacity @ 0 °C (h) | 2.208 Ah |

Initial discharge voltage @ 0 °C (e) | 3.45 V |

Voltage @ 90% maximum capacity @ 0 °C (g) | 2.8 V |

Exponential zone @ 0 °C (f) | [3.22 V, 0.23 Ah] |

Thermal resistance, cell-to-ambient (estimated) | 0.6 |

Thermal time constant, cell-to-ambient (estimated) | 1000 |

The figure shows the discharges curves obtained from the simulation (dashed lines) at different ambient temperatures. The model performance is very close to the data sheet results.

The same approach for parameter extraction is applied to the Panasonic Lithium-Ion CGR18650AF with these specifications:

These parameters are extracted for the battery model.

Parameter | Value |
---|---|

Nominal voltage (c) | 3.3 V |

Rated capacity | 2.05 Ah |

Maximum capacity (d) | 2 Ah |

Fully charged voltage (a) | 4.2 V |

Nominal discharge current | 1.95 A |

Internal resistance (estimated) | 16.5 mΩ |

Capacity @ nominal voltage (c) | 1.81 Ah |

Exponential zone (b) | [3.71 V, 0.6 Ah] |

Nominal ambient temperature | 25 oC |

Second ambient temperature | 0 oC |

Maximum capacity @ 0 °C (h) | 1.78 Ah |

Initial discharge voltage @ 0 °C (e) | 4 V |

Voltage @ 90 % maximum capacity @ 0 °C (g) | 3.11 V |

Exponential zone @ 0 °C (f) | [3.8 V, 0.2 Ah] |

Thermal resistance, cell-to-ambient (estimated) | 0.06 |

Thermal time constant, cell-to-ambient (estimated) | 1000 |

The figure shows a good match between the simulated discharge curves (dashed line) and the data sheet curves. The accuracy of the model depends on how precise the selected points from the data sheet discharge curves are.

To model a series and/or parallel combination of cells based
on the parameters of a single cell, the parameter transformation shown
in the next table can be used. The `Nb_ser`

variable
in mask below corresponds to the number of cells in series, and `Nb_par`

corresponds
to the number of cell in parallel:

Parameter | Value |
---|---|

Nominal voltage | 1.18*Nb_ser |

Rated capacity | 6.5*Nb_par |

Maximum capacity | 7*Nb_par |

Fully charged voltage | 1.39*Nb_ser |

Nominal discharge current | 1.3*Nb_par |

Internal resistance | 0.002*Nb_ser/Nb_par |

Capacity @ nominal voltage | 6.25*Nb_par |

Exponential zone | [1.28*Nb_ser, 1.3*Nb_par] |

`m`

The Simulink

^{®}output of the block is a vector containing three (or five, when temperature effects is enabled) signals. You can demultiplex these signals by using the Bus Selector block provided in the Simulink library.Signal

Definition

Units

Ambient Temperature

The Ambient temperature (available only when temperature effects is enabled)

(°C)

Cell Temperature

The cell or internal temperature (available only when temperature effects is enabled)

(°C)

SOC

The State-Of-Charge of the battery (between 0 and 100%). The SOC for a fully charged battery is 100% and for an empty battery is 0%. The SOC is calculated as:

$$SOC=100\left(1-\frac{1}{Q}{\displaystyle {\int}_{0}^{t}i(t)\text{\hspace{0.17em}}dt}\right).$$

%

Current

The Battery current

A

Voltage

The Battery voltage

V

`Ta`

The input port to supply the ambient temperature to the model. This port is available only if the

**Type**parameter is set to`Lithium-Ion`

and**Simulate temperature effects**is selected.

Experimental validation of the model shown a maximum error of 5% (when SOC is between 10% and 100%) for charge (current between 0 and 2C) and discharge (current between 0 and 5C) dynamics.

The internal resistance is supposed constant during the charge and the discharge cycles and does not vary with the amplitude of the current. When the temperature effects is enabled for the Lithium-Ion battery type, the internal resistance varies with the internal temperature of the battery.

The parameters of the model are deduced from discharge characteristics and assumed to be the same for charging.

The capacity of the battery does not change with the amplitude of current (No Peukert effect).

The Self-Discharge of the battery is not represented. It can be represented by adding a large resistance in parallel with the battery terminals.

The battery has no memory effect.

The minimum no-load battery voltage is 0 volt and the maximum battery voltage is equal to 2*E0.

The minimum capacity of the battery is 0 Ah and the maximum capacity is Qmax.

The `power_battery`

example
illustrates a 200 volts, 6.5 Ah NiMH battery connected to a constant
load of 50 A. The DC machine is connected in parallel with the load
and operates at no load torque. When the State-Of-Charge (SOC) of
the battery goes under 0.4 (40%), a negative load torque of 200 Nm
is applied to the machine so it acts as a generator to recharge the
battery. When the SOC goes over 80%, the load torque is removed so
only the battery supplies the 50 amps load.

The simulation produces the followings results:

The battery is discharged by the constant DC load of 50 A. When the SOC drops under 0.4, a mechanical torque of −200 Nm is applied so the machine acts as a generator and provides a current of 100 amps. Hence, 50 amps goes to the load and 50 amps goes to recharge the battery. When the SOC goes over 0.8, the mechanical torque is removed and the machine operates freely. And then the cycle restarts.

[1] Tremblay, O., L.-A. Dessaint, "Experimental Validation
of a Battery Dynamic Model for EV Applications." *World
Electric Vehicle Journal*. Vol. 3, May 13–16, 2009.

[2] Zhu, C., X. Li, L. Song, and L. Xiang, "Development
of a theoretically based thermal model for lithium ion battery pack." *Journal
of Power Sources*. Vol. 223, pp. 155–164.

[3] Saw, L.H., K. Somasundaram, Y. Ye, and A.A.O. Tay, "Electro-thermal
analysis of Lithium Iron Phosphate battery for electric vehicles." *Journal
of Power Sources*. Vol. 249, pp. 231–238.

Was this topic helpful?