Collection of battery examples
Collection of examples demonstrating the usage of the battery models without and with sensors.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Name | Description |
---|---|
BatteryDischargeCharge | Discharge and charge idealized battery |
SuperCapDischargeCharge | Discharge and charge idealized supercap |
CCCVcharging | Charge a battery with constant current - constant voltage characteristic |
CCCV_Cell | Charge a cell with constant current - constant voltage characteristic |
CCCV_CellRC | Charge a transient cell with constant current - constant voltage characteristic |
CCCV_Stack | Charge a stack with constant current - constant voltage characteristic |
CCCV_StackRC | Charge a transient stack with constant current - constant voltage characteristic |
ShowImpedance | Show complex cell impedance |
Discharge and charge idealized battery
Two batteries with a nominal charge of 10 A.h starting with an initial SOC = 95 % are compared:
battery1
is a battery OCV linearly dependent on SOC, without self-discharge and not comprising RC-elements.battery2
is a battery OCV dependency on SOC is specified by a table, with self-discharge and including RC-elements.
Two parameter records cellData1
and cellData2
are used to parameterize the battery models.
First the batteries are discharged with 7 current pulses of 50 A for 1 minute, and breaks between the pulses of 1 minute, ending at SOC = 5 %.
Subsequently, the batteries are charged again with 7 current pulses of 50 A for 1 minute, and breaks between the pulses of 1 minute, ending at SOC = 95 % again.
In the end, the batteries are in no-load condition to reveal self-discharge effects.
Note that self-discharge of battery2
is set to an unrealistic high value, to show self-discharge within a rather short time span.
The parameters of the RC-elements of battery2
are set to estimated values, just to demonstrate the effects.
Simulate and plot terminal voltage battery1.v
and battery2.v
as well as state of charge battery1.SOC
and battery2.SOC
.
Plotting energy1.y
and energy2.y
, it is remarkable that first energy is delivered by the battery,
but then due to the losses more energy is consumed to recharge the battery.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellData1 | |
cellData2 |
Discharge and charge idealized supercap
A supercap with a capacitance of 500 F, starting initially at nominal voltage 48 V, is discharged with 5 current pulses of 240 A for 10 seconds, and breaks between the pulses of 10 seconds. Subsequently, the supercap is charged again with 5 current pulses of 240 A for 10 seconds, and breaks between the pulses of 10 seconds. In the end, the supercap is in no-load condition to reveal self-discharge effects.
Note that self-discharge is set to an unrealistic high value, to show self-discharge within a rather short time span.
The other parameters of the supercap is set to estimated but realistic values:
C = 500 F
Vnom = 48 V
Qnom = C*Vnom = 24,000 As
Ri = 2 mΩ
Simulate and plot terminal voltage supercap.v
.
Plotting energy.y
, it is remarkable that first energy is delivered by the supercap,
but then due to the losses more energy is consumed to recharge the supercap.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Charge a battery with constant current - constant voltage characteristic
A battery depleted to SOC = 0.1
is recharged with a CC-CV charger.
Charging current in CC mode is 5C which means the battery is theoretically nearly fulled charged after 0.9*3600 s/5 = 648 s
and the charger switches to CV mode.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellData |
Charge a cell with constant current - constant voltage characteristic
A single cell depleted to SOC = 0.1
is recharged with a CC-CV charger.
Charging current in CC mode is 5C which means the battery is theoretically nearly fulled charged after 0.9*3600 s/5 = 648 s
and the charger switches to CV mode.
Simulate for 1200 s and plot cell.cellBus.soc
versus time
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellData | Cell data |
Charge a transient cell with constant current - constant voltage characteristic
A single transient cell depleted to SOC = 0.1
is recharged with a CC-CV charger.
Charging current in CC mode is 5C which means the battery is theoretically nearly fulled charged after 0.9*3600 s/5 = 648 s
and the charger switches to CV mode.
Simulate for 1200 s and plot cell.cellBus.soc
versus time
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellData | Cell data |
Charge a stack with constant current - constant voltage characteristic
A stack of cells with one degraded cell (with indices [1,1]
, with double inner resistance), all cells depleted to SOC = 0.1
, is recharged with a CC-CV charger.
Simulate for 1200 s and plot versus time
:
stack.batteryBus.soc
busTransription.stackBusArrays.soc[1,1]
busTransription.stackBusArrays.soc[1,2]
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellDataOriginal | Original cell data |
cellDataDegraded | Degraded cell data |
stackData | Stack data |
Charge a transient stack with constant current - constant voltage characteristic
A stack of transient cells with one degraded cell (with indices [1,1]
, with double inner resistance), all cells depleted to SOC = 0.1
, is recharged with a CC-CV charger.
Simulate for 1200 s and plot versus time
:
stack.batteryBus.soc
busTransription.stackBusArrays.soc[1,1]
busTransription.stackBusArrays.soc[1,2]
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellDataOriginal | Original cell data |
cellDataDegraded | Degraded cell data |
stackData | Stack data |
Show complex cell impedance
Plot impedance.z.im
versus impedance.z.re
Extends from Modelica.Icons.Example (Icon for runnable examples).
Name | Description |
---|---|
cellData |