# 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.

The equivalent circuit of the battery is shown below:

#### Discharge model (i* > 0)

${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\left(s\right)}{Sel\left(s\right)}\cdot 0\right).$

#### Charge Model (i* < 0)

${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\left(s\right)}{Sel\left(s\right)}\cdot \frac{1}{s}\right).$

### Lithium-Ion Model

#### Discharge Model (i* > 0)

${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).$

#### Charge Model (i* < 0)

${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).$

#### Discharge Model (i* > 0)

${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\left(s\right)}{Sel\left(s\right)}\cdot 0\right).$

#### Charge Model (i*< 0)

${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\left(s\right)}{Sel\left(s\right)}\cdot \frac{1}{s}\right),$

where,

EBatt = Nonlinear voltage (V)

E0 = 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:

## Dialog Box and Parameters

### Parameters Tab

Battery type

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

• Lithium-Ion

• Nickel-Metal-Hydride

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).

Use parameters based on Battery type and nominal values

Load the corresponding parameters in the entries of the dialog box, depending on the selected Battery 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 Use parameters based on Battery type and nominal values 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.

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.

### View Discharge Characteristics Tab

Plot Discharge Characteristics

Click to plot 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.

### Battery Dynamics Tab

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.

## Extract Battery Parameters From Data Sheets

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 (a)

1.18 V

Rated Capacity

6.5 Ah

Maximum Capacity (b)

7 Ah (5.38h * 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. A tool, called ScanIt (provided by amsterCHEM, http://www.amsterchem.com) can be used to extract values from data sheet curves.

The parameters obtained from the data sheet are entered in the mask of the Battery block as in the following picture:

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

## 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 figure 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:

## Block Inputs and Outputs

`m`

The Simulink output of the block is a vector containing three signals. You can demultiplex these signals by using the Bus Selector block provided in the Simulink library.

Signal

Definition

Units

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}{\int }_{0}^{t}i\left(t\right)\text{\hspace{0.17em}}dt\right).$

%

Current

The Battery current

A

Voltage

The Battery voltage

V

## Model Validation

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.

## Model Assumptions

• The internal resistance is supposed constant during the charge and the discharge cycles and doesn't vary with the amplitude of the current.

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

• The capacity of the battery doesn't change with the amplitude of current (No Peukert effect).

• The model doesn't take the temperature into account.

• 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 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.

## Example

The `power_battery``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.

## References

[1] Tremblay, O., Dessaint, L.-A. "Experimental Validation of a Battery Dynamic Model for EV Applications." World Electric Vehicle Journal. Vol. 3 - ISSN 2032-6653 - © 2009 AVERE, EVS24 Stavanger, Norway, May 13 - 16, 2009.