Main Content

Apply Temperature-Dependent Cell Parameter Variation in Battery Module

Since R2024b

This example shows how to introduce a temperature-dependent parameter variation between the individual cell models in a battery module that you generate using Simscape™ Battery™ objects and functions. Modeling temperature-dependent parameter variation is essential for achieving accurate performance predictions, optimizing efficiency, and designing and developing advanced battery systems.

This example also highlights one of the significant advantages of modeling batteries in Simscape Battery, rather than using Simulink™ blocks exclusively. When you introduce cell-to-cell variation, the conservation laws in Simscape™ automatically allocate current among the parallel-connected cells. Achieving this using only Simulink blocks is highly challenging and complex.

Create Module Block

Define the geometry of the battery cell. The PouchGeometry object allows you to define the pouch geometrical arrangement of the battery cell. To create the PouchGeometry object, use the batteryPouchGeometry function and specify the cell height as the first argument, the cell length as the second argument, and the location and width of the tabs.

cellGeometry = batteryPouchGeometry(simscape.Value(0.13,"m"),...
    simscape.Value(0.36,"m"),...
    TabLocation="Opposed",...
    TabWidth=simscape.Value(0.05,"m"));

Use this PouchGeometry object to create a pouch battery cell with a mass of 0.8 kg. To create the Cell object, use the batteryCell function and specify the cell geometry as the first argument. To specify the cell mass, use the name-value argument Mass.

cell = batteryCell(cellGeometry,Mass=simscape.Value(0.8,"kg"));

Set these model options for the battery cell:

  • The component model block of the Cell object is the Battery Equivalent Circuit block.

  • The equivalent circuit of the cell contains one parallel RC section.

  • A lumped thermal mass defines the thermal model of the battery cell.

cell.CellModelOptions.BlockParameters.prm_dyn = "rc1";
cell.CellModelOptions.CellModelBlockPath = 'batt_lib/Cells/Battery Equivalent Circuit';
cell.CellModelOptions.BlockParameters.ThermalModel = "LumpedThermalMass";

Plot the battery cell by using the batteryChart object.

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,cell);
title(moduleChart,"Cell Chart");

Figure contains an object of type simscape.battery.builder.batterychart.

Now use this Cell object to create the ParallelAssembly object with the batteryParallelAssembly function. Define the Cell object as the first argument and the number of cells in parallel as the second argument. To specify the additional parallel assembly properties, use the name-value arguments Topology and InterCellGap.

parallelAssembly = batteryParallelAssembly(cell,2, ...
    Topology="SingleStack",...
    InterCellGap=simscape.Value(0.001,"m"));

Plot the parallel assembly by using the BatteryChart object.

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,parallelAssembly);
title(moduleChart,"Parallel Assembly Chart");

Figure contains an object of type simscape.battery.builder.batterychart.

Finally, use the ParallelAssembly object to create the Module object with the batteryModule function. Define the ParallelAssembly object as the first argument and the number of parallel assemblies in series as the second argument. To specify the additional module properties use the name-value arguments InterParallelAssemblyGap, ModelResolution, and AmbientThermalPath. The model resolution defines how many cells an individual cell model represents. In a detailed module, an individual cell model represents each cell in the module.

module = batteryModule(parallelAssembly,3,... 
    InterParallelAssemblyGap=simscape.Value(0.008,"m"),...
    ModelResolution="Detailed",...
    AmbientThermalPath="CellBasedThermalResistance");

Enable the option to model cell-to-cell parameter variation. When you set the CellParameterVariation property to "PercentDeviation", the cell parameters in the generated Module block have an associated Percent deviation parameter that specifies the percent deviation of the value of corresponding cell parameter for each cell model in the battery. The value of the corresponding cell parameter with the deviation applied is equal to:

cellParameter=1+(cellParameterDeviation100)exposedCellParameter.

The number of cell models in the battery and the model resolution define the size of the Percent deviation parameter.

module.CellParameterVariation = "PercentDeviation";

Plot the module by using the BatteryChart object.

f = figure(Color="w",Position=[0,0,1000,500]);
moduleChart = batteryChart(f,module);
title(moduleChart,"Module Chart")

Figure contains an object of type simscape.battery.builder.batterychart.

To create a library that contains the Simscape Battery model of the Module object in this example, use the buildBattery function.

if not(isfolder("+ModuleTemperatureDependentVariation\") | isfile("ModuleTemperatureDependentVariation_lib.slx"))
    buildBattery(module,LibraryName="ModuleTemperatureDependentVariation",MaskParameters="VariableNamesByType");
end

Simulate Module Without Parameter Variation

Open the DetailedModuleDischarge model. In this model, a Discharger block discharges the battery module with a constant discharging current of 54 A until the voltage of the module is less than or equal to 6 V.

open_system("DischargeDetailedModule");

Decrease the cell-level ambient thermal resistance of the generated Module block to 0.5 K/W and run the simulation.

Module1.AmbientResistance = 0.5; 
out = sim("DischargeDetailedModule");

Plot and visualize the simulation results. These plots show the values of the current, state of charge (SOC), temperature, and voltage in each cell of each parallel assembly inside the module. The values for all the different cells overlap, which indicates that all cells currently have an identical performance.

plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

Simulate Module with Capacity Variation

Double-click the Module block to open the Block Parameters window. Because the CellParameterVariation property of the Module object is PercentDeviation, the software associates a percent deviation parameter with each corresponding parameter. Each element of this parameter represents the deviation of the parameter for one specific cell model in the module.

The detailed module comprises three parallel assemblies with two cells each. A unique cell model represents every cell in the battery, for a total of six cell models. The Percent Deviation parameter is a column vector with a length of 6. You can review the design of the battery in the Description tab of the Block Parameters window of the block.

Simulate the behavior of a battery when the individual cells have a variation in the capacity. Manufacturing inaccuracies or different values of the state of health (SOH) of the batteries can cause this variation.

Module1.BatteryCapacityCellPercentDeviation = [5;-1;-3;-2;4;1];

With these variation settings, the second and third parallel assemblies has the lowest and highest capacities, respectively. Inside the first parallel assembly, the first cell has higher capacity than the second cell. These two cells are connected in parallel and have the same voltage.

Simulate the model and plot the results. These plots show the values of the current, state of charge, temperature, and voltage in each cell of each parallel assembly inside the module.

out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

To see the differences among the cells, increase the zoom of the plots.

plotSimResults(out,[1000 1100]);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

As expected, the SOC and voltage of the second parallel assembly are lower than the SOC and voltage values of the other parallel assemblies, due to its lowest capacity. The SOC and voltage of the third parallel assembly are the highest among the three parallel assemblies. Within the first parallel assembly, the high capacity of the first cell provides higher current than the second cell because of its high capacity.

Simulate Module with Resistance Variation and Temperature Dependency

Simulate the behavior of the battery module when you add a temperature-dependent variation in the instantaneous resistance, R0.

By default, the Instantaneous resistance, R0(SOC,T) parameter of the Battery Equivalent Circuit block is a 7-by-3 matrix, with seven SOC breakpoints and three temperature breakpoints. The battery module in this model comprises six cells. If you apply the same workflow of the previous section and you set the parameter variation using a 6-by-1 vector, you specify the same percent deviation for the same cell, regardless of the temperature and SOC.

To specify a SOC-dependent and temperature-dependent variation, you must then specify a 42-by-3 matrix, by concatenating six 7-by-3 matrices along the rows, where six is the number of cells in the module. Each 7-by-3 matrix corresponds to the Instantaneous resistance, R0(SOC,T) parameter of a cell in the module.

Check the dimension compatibility of the matrices with a zero deviation.

Module1.BatteryCapacityCellPercentDeviation = zeros(6,1); 
Module1.R0ThermalCellPercentDeviation = zeros(42,3);
out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

The current, SOC, temperature, and voltage values overlap for all six cells as there is no deviation.

Now introduce some non-zero deviation. Specify a percent deviation for the first cell of the first parallel assembly such that R0 is higher at low SOC values and lower at high SOC values.

Module1.R0ThermalCellPercentDeviation(1:7,:) = [
     5  5  5;
     3  3  3;
     1  1  1;
     0  0  0;
    -1 -1 -1;
    -2 -2 -2;
    -4 -4 -4]; 

Specify a percent deviation for the first cell of the second parallel assembly such that R0 is higher at high temperature values and lower at low temperature values.

Module1.R0ThermalCellPercentDeviation(15:21,:) = [
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5;
    -10 -5 5]; 

Simulate the model and plot the results.

out = sim('DischargeDetailedModule');
plotSimResults(out);

Figure contains 4 axes objects. Axes object 1 with title I, xlabel Time (seconds), ylabel I (A) contains 6 objects of type line. Axes object 2 with title SOC, xlabel Time (seconds), ylabel SOC contains 6 objects of type line. Axes object 3 with title T, xlabel Time (seconds), ylabel T (K) contains 6 objects of type line. Axes object 4 with title V, xlabel Time (seconds), ylabel V (V) contains 6 objects of type line. These objects represent Cell 1 of ParallelAssembly 1, Cell 2 of ParallelAssembly 1, Cell 1 of ParallelAssembly 2, Cell 2 of ParallelAssembly 2, Cell 1 of ParallelAssembly 3, Cell 2 of ParallelAssembly 3.

At the beginning of the simulation when battery is fully charged, the first cell of the first parallel assembly draws more current than the second cell of the first parallel assembly because of the lower resistance values (negative deviation for higher SOC), but draws less current later because of the higher resistance values (positive deviation for lower SOC).

Similarly, at the beginning of the simulation, the first cell of the second parallel assembly draws more current than the second cell of the second parallel assembly because of the lower resistance values (negative deviation) when the temperature is lower (298 K), but draws less current later because of the higher resistance value when the temperature is higher (306 K).

See Also

|

Related Topics