modelIdealBattery
Re-chargeable ideal battery without loss
Information
This is a simple, linear rechargable battery model. The actual physical model consists of one capacitor. In order to consider the number of series and parallel connected cells, an internal scaling of voltages, currents and power terms, is performed.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | ns | 1 | Number of series cells |
| Integer | np | 1 | Number of parallel cells |
| Modelica.Units.SI.Voltage | V1Cell | Maximum cell voltage > V0Cell | |
| Modelica.Units.SI.Voltage | V0Cell | Minimum cell voltage < V1Cell | |
| Modelica.Units.SI.Voltage | V1 | V1Cell*ns | Maximum battery voltage > V0 |
| Modelica.Units.SI.Voltage | V0 | V0Cell*ns | Maximum battery voltage < V1 |
| Boolean | allowOvercharge | false | Allows overcharging without error |
| Boolean | allowUndercharge | false | Allows undercharging without error |
| Modelica.Units.SI.Energy | ECell | Total cell energy between V0Cell and V1Cell | |
| Modelica.Units.SI.Capacitance | CCell | 2*ECell/(V1Cell^2 - V0Cell^2) | Total charge of battery |
| Modelica.Units.SI.Voltage | ViniCell | V1Cell | Initial cell voltage |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Electrical.Analog.Interfaces.PositivePin | pin_p | Positive pin | |
| Modelica.Electrical.Analog.Interfaces.NegativePin | pin_n | Negative pin |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Voltage | v | pin_p.v - pin_n.v | Battery voltage |
| Modelica.Units.SI.Voltage | vCell | v/ns | Cell voltage |
| Modelica.Units.SI.Current | i | capacitor.i | Battery current |
| Modelica.Units.SI.Current | iCell | i/np | Cell current |
| Modelica.Units.SI.Power | power | v*i | Battery power |
| Modelica.Units.SI.Power | powerCell | power/ns/np | Cell power |
| Modelica.Units.SI.Energy | energy | Energy | |
| Modelica.Units.SI.Energy | energyCell | Cell energy | |
| Modelica.Electrical.Analog.Basic.Capacitor | capacitor |