Main Content

Size Resistor for Battery Passive Cell Balancing

This example shows how to implement a passive cell balancing for a lithium-ion battery pack. Cell-to-cell differences in the battery module create imbalances in the cell state-of-charge (SOC) and voltages. In this example, the balancing algorithm triggers when the battery pack is idle and the difference in the cell SOC is greater than a certain predefined value. The passive balancing shunt resistor is sized based on power loss and balancing time considerations.

Build Battery Pack

To build the battery pack used in this example, follow the steps in the Build Model of Battery Pack with Cell Balancing Circuit example and generate the batt_PackWithCellBalancingLib SLX files in your working directory. This SLX file contains the battery pack model for cell balancing applications. This battery pack comprises two module assemblies. Each module assembly comprises two modules. Each battery module has 16 cells. Open the batt_PackWithCellBalancingLib SLX file, drag and drop the Pack subsystem to your model, and connect it to the Passive Cell Balancing block. The Passive Cell Balancing block uses the cell SOC as balancing parameter.

batt_PackWithCellBalancing_pic.png

Define Parameters

Initialize the battery parameters.

run("batt_PackWithCellBalancing_param");

In this example, the balancing threshold is equal to 0.1% of the SOC.

threshold_balancing_SOC = 1e-3;

For both the modules inside ModuleAssembly1 object, define all the 16 initial cell SOC.

ModuleAssembly1.Module1.socCell =...
    [0.69;0.69;0.69;0.69;...
    0.715;0.715;0.715;0.715;...
    0.7;0.7;0.7;0.7;...
    0.7;0.7;0.7;0.7];
ModuleAssembly1.Module2.socCell =...
    ModuleAssembly1.Module1.socCell;

Do the same for both modules inside the ModuleAssembly2 object.

ModuleAssembly2.Module1.socCell =...
    [0.69;0.69;0.69;0.69;...
     0.715;0.715;0.715;0.715;...
     0.7;0.7;0.7;0.7;...
     0.7;0.7;0.7;0.7];
ModuleAssembly2.Module2.socCell =...
    ModuleAssembly2.Module1.socCell;

Specify the shunt resistor options that you want to evaluate.

balancingResistor_options = [2 3 4 5 6]; % all Resistances in Ohm

Run Simulations

Simulate the model for all the balancing resistor options specified in the balancingResistor_options variable. At the MATLAB® Command Window, run the batt_PackWithCellBalancingSimulate file.

run('batt_PackWithCellBalancingSimulate')

The file runs simulation for all the balancing resistor options and stores the output result in a batt_PackWithCellBalancingResults MAT file.

Analyze Results

Load the batt_PackWithCellBalancingResults MAT file, in the MATLAB Command Window, enter:

run("batt_PackWithCellBalancingPlot")

Figure contains an axes object. The axes object with title Balancing Time in Hours, xlabel Resistor Rating (Ohms), ylabel Time (hours) contains an object of type line.

Figure contains an axes object. The axes object with title Power Loss in Watts, xlabel Resistor Rating (Ohms), ylabel Power Loss (W) contains an object of type line.

The first plot shows the balancing time, in hours, for each resistor rating. For a pack resistor of 4 Ohm, the battery SOC balances in around 2.5 hours.

The second plot shows the power loss, in Watts, for each resistor rating. A resistor of 4 Ohm produces a power loss equal to almost 25 W.

The 4 Ohm resistor is a good trade-off for the final hardware.

See Also

|

Related Examples

More About