modelBattery

Re-chargeable battery with internal resistor

Extends from ElectroMechanicalDrives.BaseClasses.Battery (Partial re-chargeable battery with internal resistor).

Information

This linear battery model is based on a linear capacitor which can be charged and discharged. The battery cell is parameterized by the upper and lower operationg voltage limit and the total energy content ECell which is accessible for V0cell ≤ vCell ≤ V1Cell. By default the battery starts fully charged. The battery internal resistance RCell is considered.

By default an assert is triggered with the battery is overcharged oder undercharged. These asserts can be avoided by setting the parameters allowOvercharge and allowUndercharge to true.

Parameters

TypeNameDefaultDescription
Integerns (from Battery)1Number of series cells
Integernp (from Battery)1Number of parallel cells
Modelica.Units.SI.VoltageV1Cell (from Battery)4.2Maximum cell voltage > V0Cell
Modelica.Units.SI.VoltageV0Cell (from Battery)2.5Minimum cell voltage < V1Cell
Modelica.Units.SI.VoltageV1 (from Battery)V1Cell*nsMaximum battery voltage > V0
Modelica.Units.SI.VoltageV0 (from Battery)V0Cell*nsMaximum battery voltage < V1
BooleanallowOvercharge (from Battery)falseAllows overcharging without error
BooleanallowUndercharge (from Battery)falseAllows undercharging without error
Modelica.Units.SI.EnergyECell (from Battery)Total cell energy between V0Cell and V1Cell
Modelica.Units.SI.CapacitanceCCell (from Battery)2*ECell/(V1Cell^2 - V0Cell^2)Total charge of battery
Modelica.Units.SI.ResistanceRCell (from Battery)Cell resistance
Modelica.Units.SI.VoltageViniCell (from Battery)V1CellInitial cell voltage

Connectors

TypeNameDefaultDescription
Modelica.Electrical.Analog.Interfaces.PositivePinpin_p (from Battery)Positive pin
Modelica.Electrical.Analog.Interfaces.NegativePinpin_n (from Battery)Negative pin

Components

TypeNameDefaultDescription
Modelica.Units.SI.Voltagev (from Battery)pin_p.v - pin_n.vBattery voltage
Modelica.Units.SI.VoltagevCell (from Battery)v/nsCell voltage
Modelica.Units.SI.Currenti (from Battery)capacitor.iBattery current
Modelica.Units.SI.CurrentiCell (from Battery)i/npCell current
Modelica.Units.SI.Powerpower (from Battery)v*iBattery power
Modelica.Units.SI.PowerpowerCell (from Battery)power/ns/npCell power
Modelica.Units.SI.Energyenergy (from Battery)Energy
Modelica.Units.SI.EnergyenergyCell (from Battery)Cell energy
Modelica.Electrical.Analog.Basic.Capacitorcapacitor (from Battery)
Modelica.Electrical.Analog.Basic.Resistorresistor (from Battery)