modelSimpleBattery
Simple battery based on block controller logic
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Conversions.NonSIunits.Energy_Wh | capacity_max | 100e6 | Maximum storage capacity |
| SI.Conversions.NonSIunits.Energy_Wh | capacity_min | 0 | Minimum storage capacity |
| SI.Power | chargePower_max | Modelica.Constants.inf | Maximum charge power |
| SI.Power | chargePower_min | 0 | Minimum charge power |
| SI.Power | dischargePower_max | Modelica.Constants.inf | Maximum discharge power |
| SI.Power | dischargePower_min | 0 | Minimum discharge power |
| SI.Conversions.NonSIunits.Energy_Wh | capacity_usable | capacity_max - capacity_min | Maximum usable capacity |
| SI.Energy | E_start | SI.Conversions.from_Wh(capacity_usable)*capacityFrac_start + E_min | Start energy |
| SI.Energy | E_max | SI.Conversions.from_Wh(capacity_max) | Maximum storable energy |
| SI.Energy | E_min | SI.Conversions.from_Wh(capacity_min) | Minimum storable energy |
| Initialization | |||
| TRANSFORM.Units.NonDim | capacityFrac_start | 1.0 | Initial capacity as a fraction of usable capacity (capacity_max-capacity_min) |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | W_setpoint | Demanded power input/output | |
| TRANSFORM.Electrical.Interfaces.ElectricalPowerPort_Flow | port |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Energy | E | Total energy stored | |
| SI.Power | W | Charge/discharge power | |
| SI.Frequency | f | Electrical frequency | |
| Modelica.Blocks.Logical.GreaterThreshold | greaterThreshold | ||
| Modelica.Blocks.Logical.Switch | W_limited | Charge/discharge power after limiting operations | |
| Modelica.Blocks.Logical.GreaterThreshold | charge_min_greater | ||
| Modelica.Blocks.Logical.LessEqualThreshold | charge_max_less | ||
| Modelica.Blocks.Logical.Switch | charge_switch | ||
| Modelica.Blocks.Sources.Constant | chargeZero | ||
| Modelica.Blocks.Logical.Switch | charge_max_switch | ||
| Modelica.Blocks.Sources.Constant | charge_max | ||
| Modelica.Blocks.Logical.GreaterThreshold | discharge_min_greater | ||
| Modelica.Blocks.Logical.Switch | discharge_switch | ||
| Modelica.Blocks.Logical.LessEqualThreshold | discharge_max_less | ||
| Modelica.Blocks.Logical.Switch | discharge_max_switch | ||
| Modelica.Blocks.Math.Abs | abs | ||
| Modelica.Blocks.Sources.Constant | dischargeZero | ||
| Modelica.Blocks.Sources.Constant | discharge_max | ||
| Modelica.Blocks.Continuous.LimIntegrator | E_total | total stored energy of battery |