Documentation

Battery

Implement generic battery model

Library

Electric Drives/Extra Sources

Description

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

This figure shows the battery equivalent circuit that the block models.

For the lead-acid battery type, the model uses these equations:

  • Discharge Model (i* > 0)

    f1(it,i*,i,Exp)=E0KQQiti*KQQitit+Laplace1(Exp(s)Sel(s)0)

  • Charge Model (i* < 0)

    f2(it,i*,i,Exp)=E0KQit+0.1Qi*KQQitit+Laplace1(Exp(s)Sel(s)1s)

For the lithium-ion battery type, the model uses these equations:

  • Discharge Model (i* > 0)

    f1(it,i*,i)=E0KQQiti*KQQitit+Aexp(Bit)

  • Charge Model (i* < 0)

    f2(it,i*,i)=E0KQit+0.1Qi*KQQitit+Aexp(Bit)

For the nickel-cadmium and nickel-metal-hydride battery types, the model uses these equations:

  • Discharge Model (i* > 0)

    f1(it,i*,i,Exp)=E0KQQiti*KQQitit+Laplace1(Exp(s)Sel(s)0)

  • Charge Model (i* < 0)

    f2(it,i*,i,Exp)=E0KQ|it|+0.1Qi*KQQitit+Laplace1(Exp(s)Sel(s)1s).

    In the equations:

    • EBatt is nonlinear voltage, in V.

    • E0 is constant voltage, in V.

    • Exp(s) is exponential zone dynamics, in V.

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

    • K is polarization constant, in Ah−1.

    • i* is low frequency current dynamics, in A.

    • i is battery current, in A.

    • it is extracted capacity, in Ah.

    • Q is maximum battery capacity, in Ah.

    • A is exponential voltage, in V.

    • B is exponential capacity, in Ah−1.

Charge and Discharge Characteristics

The parameters of the equivalent circuit can be modified to represent a particular battery type, based on its discharge characteristics. A typical discharge curve consists of three sections.

The first section represents the exponential voltage drop when the battery is charged. The width of the drop depends on the battery type. 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 recharges, following a charge characteristic.

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

The Exp(s) transfer function represents the hysteresis phenomenon for the lead-acid, nickel-cadmium (NiCD), and nickel-metal hydride (NiMH) batteries during charge and discharge cycles. The exponential voltage increases when a battery is charging, regardless of the battery state of charge. When the battery is discharging, the exponential voltage decreases immediately.

Temperature Effect

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

  • Discharge Model (i* > 0)

    f1(it,i*,i,T,Ta)=E0(T)K(T)Q(Ta)Q(Ta)it(i*+it)+Aexp(Bit)Cit

    Vbatt(T)=f1(it,i*,i,T,Ta)R(T)i

  • Charge Model (i* < 0)

    f1(it,i*,i,T,Ta)=E0(T)K(T)Q(Ta)it+0.1Q(Ta)i*K(T)Q(Ta)Q(Ta)itit+Aexp(Bit)Cit

    Vbatt(T)=f1(it,i*,i,T,Ta)R(T)i,

    with

    E0(T)=E0|Tref+ET(TTref)

    K(T)=K|Trefexp(α(1T1Tref))

    Q(Ta)=Q|Ta+ΔQΔT(TaTref)

    R(T)=R|Trefexp(β(1T1Tref)),

    where:

    • Tref is nominal ambient temperature, in K.

    • T is cell or internal temperature, in K.

    • Ta is ambient temperature, in K.

    • E/T is reversible voltage temperature coefficient, in V/K.

    • α is Arrhenius rate constant for the polarization resistance.

    • β is Arrhenius rate constant for the internal resistance.

    • ΔQT is maximum capacity temperature coefficient, in Ah/K.

    • C is nominal discharge curve slope, in 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)=L1(PlossRth+Ta1+stc),

    where:

    • Rth is thermal resistance, cell to ambient (°C/W).

    • tc is thermal time constant, cell to ambient (s).

    • Ploss is the overall heat generated (W) during charge/discharge process and is given by

      Ploss=(E0(T)Vbatt(T))i+ETiT.

Aging Effect

For the lithium-ion battery type, the impact of aging (due to cycling) on the battery capacity and internal resistance is represented by these equations:

Q(n)={QBOLε(n)(QBOLQEOL)ifk/20Q(n1)otherwise

R(n)={RBOL+ε(n)(REOLRBOL)ifk/20R(n1)otherwise,

with

n=kTh(k=1,2,3,...)

where:

  • Th is half-cycle duration in s. A complete cycle is obtained when the battery is discharged and charged or conversely.

  • QBOL is battery maximum capacity in Ah, at the beginning of life (BOL), nominal ambient temperature.

  • QEOL is battery maximum capacity in Ah at the end of life (EOL), nominal ambient temperature.

  • RBOL is battery internal resistance in ohms at the BOL, nominal ambient temperature.

  • REOL is battery internal resistance in ohms at the EOL, nominal ambient temperature.

  • ε is battery aging factor. The aging factor is equal to zero and unity at the BOL and EOL, respectively.

The battery aging factor, ξ, is expressed as

ε(n)={ε(n1)+0.5N(n1)(2DOD(n2)+DOD(n)DOD(n1))ifk/20ε(n1)otherwise,

where:

  • DOD is battery depth-of-discharge (%) after a half-cycle duration.

  • N is maximum number of cycles and is given by

    N(n)=H(DOD(n)100)ξexp(ψ(1Tref1Ta(n)))(Idis_ave(n))γ1(Ich_ave(n))γ2,

    where:

    • H is cycle number constant (cycles).

    • ξ is exponent factor for the DOD.

    • ψ is Arrhenius rate constant for the cycle number.

    • Idis_ave is average discharge current in A during a half cycle duration.

    • Ich_ave is average charge current in A during a half cycle duration.

    • γ1 is exponent factor for the discharge current.

    • γ2 is exponent factor for the charge current.

Parameters

Parameters Tab

Type

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

  • Lead-Acid

  • Lithium-Ion (default)

  • 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 available only if the Type parameter is set to Lithium-Ion. Default is cleared.

Simulate aging effects

Select this parameter to enable the Aging tab becomes visible and display the aging model parameters. To enable the Simulate aging effects parameter, set the Type parameter to Lithium-Ion. Default is cleared.

Use a preset battery

The parameter contains a list of 10 predetermined temperature parameters of typical lithium-ion batteries. Default is no. The parameters in the Temperature tab are not accessible when a preset is selected. The Use a preset battery parameter is available 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 in V. The nominal voltage represents the end of the linear zone of the discharge characteristics. Default is 7.2.

Rated capacity (Ah)

The rated capacity, Qrated, of the battery in Ah. The rated capacity is the minimum effective capacity of the battery. Default is 5.4.

Initial state-of-charge (%)

The initial state-of-charge (SOC) of the battery. An SOC of 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). Default is 100.

Battery response time (s)

The response time of the battery (at 95% of the final value). Default is 30. This value represents the voltage dynamics and can be observed when a current step is applied.

This example uses the battery response time of 30 s.

Discharge Tab

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 clear the Determined from the nominal parameters of the battery check box to access the detailed parameters. Default is cleared.

Maximum capacity (Ah)

The maximum theoretical capacity, Q, when a discontinuity occurs in the battery voltage in Ah. This value is generally equal to 105% of the rated capacity. Default is 5.4.

Cut-off voltage (V)

The minimum allowable battery voltage in V. This voltage represents the end of the discharge characteristics. At the cut-off voltage, the battery is fully discharged. Default is 5.4.

Fully charged voltage (V)

The fully charged voltage, Vfull, for a given discharge current. The fully charged voltage is not the no-load voltage. Default is 8.3807.

Nominal discharge current (A)

The nominal discharge current, for which the discharge curve has been measured, in A. For example, a typical discharge current for a 1.5-Ah NiMH battery is 20% of the rated capacity: (0.2 * 1.5 Ah / 1 h = 0.3 A). Default is 2.3478.

Internal resistance (Ohms)

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

Capacity (Ah) at 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. Default is 4.8835.

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. Default is [7.7788 0.2653].

Discharge current [i1, i2, i3,...] (A)

Allows specifying different values of discharge current. The discharge characteristics for these currents are presented in the second part of the graph. Default is [6.5 13 32.5].

Units

Choose either Time (default) or Ampere-hour as the x-axis for the plot.

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.

Temperature Tab

To enable this tab, set the Type parameter to Lithium-Ion and select Simulate temperature effect.

Initial cell temperature (deg. C)

The initial cell or internal temperature of the battery, in °C. Default is 20.

Nominal ambient temperature T1 (deg. C)

The ambient temperature, in °C, at nominal condition of operation. It is assumed that all parameters provided in the Parameters tab are obtained at this ambient temperature. Default is 20.

Second ambient temperature T2 (deg. C)

The ambient temperature, in °C, at the second operating condition, preferably below the nominal ambient temperature. Default is -30.

Maximum capacity (Ah)

The maximum battery capacity, in Ah, at the second ambient temperature. Default is 4.8.

Initial discharge voltage (V)

The initial discharge voltage at the second ambient temperature, in V, when the discharge current is applied. Default is 7.1.

Voltage at 90% maximum capacity (V)

The discharge voltage, in V, when 90% of the maximum capacity is used, at the second ambient temperature. Default is 5.655.

Exponential zone [Voltage (V), Capacity (Ah)]

The discharge voltage, in volts, and the capacity, in Ah, corresponding to the end of the exponential zone, at the second ambient temperature. Default is [6.58 1].

Thermal resistance, cell-to-ambient (deg. C/W)

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. Default is 0.6.

Thermal time constant, cell-to-ambient (s)

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. Default is 2000.

Heat loss difference [charge vs. discharge] (W)

The power loss difference between charge and discharge in W, when the battery is charged and discharged at the same C-rate and ambient temperature. Default is 0.

Determine the power loss difference (ΔP) using the following expression:

ΔP=tc(θ2θ1)Rth

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

Aging Tab

To enable this tab, set the Type parameter to Lithium-Ion and select Simulate aging effect.

Initial battery age (Equivalent full cycles)

Battery age or equivalent full cycles at the beginning of the simulation. A full cycle is defined as a complete discharge and charge to 100% DOD and 100% SOC, respectively, at a nominal ambient temperature and nominal discharge and charge current. Default is 0.

Aging model sampling time (s)

Simulation time step of the aging model, in s. Default is 1e6.

Ambient temperature Ta1 (deg. C)

First ambient temperature during the aging performance test, in °C. Default is 25.

Capacity at EOL (End of Life) (Ah)

Maximum capacity at EOL at ambient temperature Ta1, in Ah. Default is 5.4*0.9.

Internal resistance at EOL (Ohms)

Internal resistance at EOL at ambient temperature Ta1, in ohms. Default is 0.013333*1.2.

Charge current (nominal, maximum) [Ic (A), Icmax (A)]

Nominal and maximum charge current in A. Default is [2.3478, 3].

Discharge current (nominal, maximum) [Id (A), Idmax (A)]

Nominal and maximum discharge current in A. Default is [2.3478, 10].

Cycle life at 100 % DOD, Ic and Id (Cycles)

Number of cycles at 100% DOD, nominal charge and discharge current, first ambient temperature. Default is 1500.

Cycle life at 25 % DOD, Ic and Id (Cycles)

Number of cycles at 25% DOD, nominal charge and discharge current, first ambient temperature. Default is 10500.

Cycle life at 100 % DOD, Ic and Idmax (Cycles)

Number of cycles at 100% DOD, nominal charge current, maximum discharge current, first ambient temperature. Default is 1000.

Cycle life at 100 % DOD, Icmax and Id (Cycles)

Number of cycles at 100 % DOD, maximum charge current, nominal discharge current, first ambient temperature. Default is 1400.

Ambient temperature Ta2 (deg. C)

Second ambient temperature, in °C, during the aging performance test. Default is 45.

Cycle life at 100 % DOD, Ic and Id (Cycles)

Number of cycles at 100% DOD, nominal charge and discharge current, second ambient temperature. Default is 950.

Extract Battery Parameters from Data Sheets

This figure shows detailed parameters extracted from the Panasonic NiMH-HHR650D battery data sheet.

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

Parameter

Value

Rated Capacity

6.5 Ah

Internal Resistance

2 mΩ

Nominal Voltage (a)

1.18 V

Rated Capacity

6.5 Ah

Maximum Capacity (b)

7 Ah (5.38 h * 1.3A)

Fully Charged Voltage (c)

1.39 V

Nominal Discharge Current (d)

1.3 A

Capacity @ Nominal Voltage (a)

6.25 Ah

Exponential Voltage (e)

1.28 V

Exponential Capacity (e)

1.3 Ah

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

The discharge curves you obtain with these parameters, marked by dotted lines in next plots, are similar to the data sheet curves.

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

The A123 ANR26650M1 data sheet specifications include 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.

ParameterValue

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 at nominal voltage (c)

2.07 Ah

Exponential zone (b)

[3.4 V, 0.23 Ah]

Nominal ambient temperature

25 °C

Second ambient temperature

0 °C

Maximum capacity at 0 °C (h)

2.208 Ah

Initial discharge voltage at 0 °C (e)

3.45 V

Voltage at 90% maximum capacity at 0 °C (g)

2.8 V

Exponential zone at 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

In the figure, the dashed lines show the discharges curves obtained from the simulation 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.

ParameterValue

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 at nominal voltage (c)

1.81 Ah

Exponential zone (b)

3.71 V, 0.6 Ah

Nominal ambient temperature

25 °C

Second ambient temperature

0 °C

Maximum capacity at 0 °C (h)

1.78 Ah

Initial discharge voltage at 0 °C (e)

4 V

Voltage at 90 % maximum capacity at 0 °C (g)

3.11 V

Exponential zone at 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.

Cells in Series and/or in Parallel

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 corresponds to the number of cells in series, and Nb_par corresponds to the number of cells in parallel.

ParameterValue

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 at nominal voltage

6.25 * Nb_par

Exponential zone

1.28 * Nb_ser, 1.3 * Nb_par

Block Inputs and Outputs

m

The Simulink® output of the block is a vector containing seven 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 battery state-of-charge (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(11Q0ti(t)dt).

%

Current

The battery current

A

Voltage

The battery voltage

V

Age

The battery age (available only when aging effects are enabled)

Equivalent full cycles

Maximum Capacity

The battery maximum capacity (available only when aging effects are enabled)

Ah

Ta

The input port to supply the ambient temperature to the model. To enable this port, set the Type parameter to Lithium-Ion and select Simulate temperature effects.

Model Validation

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

Model Assumptions

  • The internal resistance is assumed constant during the charge and discharge cycles and does not vary with the amplitude of the current.

  • The parameters of the model are derived 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.

Limitations

  • The minimum no-load battery voltage is 0 V 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.

Examples

The power_battery example illustrates a 200 V, 6.5-Ah NiMH battery connected to a constant load of 50 A.

References

[1] Omar N., M. A. Monem, Y. Firouz, J. Salminen, J. Smekens, O. Hegazy, H. Gaulous, G. Mulder, P. Van den Bossche, T. Coosemans, and J. Van Mierlo. “Lithium iron phosphate based battery — Assessment of the aging parameters and development of cycle life model.” Applied Energy, Vol. 113, January 2014, pp. 1575–1585.

[2] 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.

[3] 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.

[4] 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.

Introduced in R2008a

Was this topic helpful?