# Battery

The DISPATCHES Battery Model represents electricity energy storage with efficiencies for charge and discharge as well as capacity degradation with cycling. Electricity inflows and outflows determine the state-of-charge and energy throughput of the battery.

## Degrees of Freedom

The Battery Model has X degrees of freedom.

## Model Structure

The Battery Model uses the inlet and outlet electricity to determine how the stored energy and storage capacity of the battery changes from the user-defined initial conditions. The initial conditions consist of the initial_state_of_charge and initial_energy_throughput. A parameter, dt, is required to convert between electricity flows and stored energy. The degradation_rate describes how the storage capacity of the battery decreases with use, accounted for by energy_throughput.

## Variables

The Battery Model uses the following variables:

Variable Name

Symbol

Notes

nameplate_power

$$P$$

nameplate_energy

$$E$$

charging_eta

$$\eta_c$$

discharging_eta

$$\eta_d$$

$$d$$

initial_state_of_charge

$$SOC_{init}$$

initial_energy_throughput

$$ET_{init}$$

dt

$$\Delta t$$

Used to convert power flows into energy holdup

elec_in

$$I_{t}$$

elec_out

$$O_{t}$$

state_of_charge

$$SOC_{t}$$

energy_throughput

$$ET_{t}$$

## Constraints

State of charge evolves with electricity in and out flows:

$SOC_t = SOC_{init} + \eta_c \times \Delta t \times I_t - \frac{\Delta t \times O_t}{\eta_d}$

Energy throughput is accumulated over time:

$ET_t = ET_{init} + \Delta t \times \frac{I_t + O_t}{2}$

Storage capacity is limited by degradation which increases with energy throughput:

$SOC_t \leq E - d \times ET_t$

## Battery Class

class dispatches.unit_models.battery.BatteryStorage(*args, **kwds)

Simple battery model

Parameters
• rule (function) – A rule function or None. Default rule calls build().

• concrete (bool) – If True, make this a toplevel model. Default - False.

• ctype (class) –

Pyomo ctype of the block. Default - pyomo.environ.Block

Config args
dynamic

Battery does not support dynamic models, thus this must be False.

has_holdup

Battery does not have defined volume, thus this must be False.

• initialize (dict) – ProcessBlockData config for individual elements. Keys are BlockData indexes and values are dictionaries with config arguments as keys.

• idx_map (function) – Function to take the index of a BlockData element and return the index in the initialize dict from which to read arguments. This can be provided to override the default behavior of matching the BlockData index exactly to the index in initialize.

Returns

(BatteryStorage) New instance