modelBatteryDischargeCharge

Discharge and charge idealized battery

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

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.

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.CurrentIsc1200Short-circuit current of cell at OCVmax
Modelica.Electrical.Batteries.ParameterRecords.CellDatacellData1
Modelica.Electrical.Batteries.ParameterRecords.TransientData.ExampleDatacellData2

Components

TypeNameDefaultDescription
Modelica.Electrical.Batteries.Utilities.PulseSeriespulseSeries
Modelica.Electrical.Batteries.BatteryStacks.CellStackbattery1
Modelica.Electrical.Analog.Basic.Groundground1
Modelica.Electrical.Analog.Sources.SignalCurrentsignalCurrent1
Modelica.Electrical.Analog.Sensors.PowerSensorpowerSensor1
Modelica.Blocks.Continuous.Integratorenergy1
Modelica.Electrical.Batteries.BatteryStacks.CellRCStackbattery2
Modelica.Electrical.Analog.Basic.Groundground2
Modelica.Electrical.Analog.Sources.SignalCurrentsignalCurrent2
Modelica.Electrical.Analog.Sensors.PowerSensorpowerSensor2
Modelica.Blocks.Continuous.Integratorenergy2
Modelica.Blocks.Math.Gaingain