gym_anm.simulator.components.devices.StorageUnit

class gym_anm.simulator.components.devices.StorageUnit(dev_spec, bus_ids, baseMVA)[source]

Bases: Device

A distributed storage unit connected to an electrical power grid.

__init__(dev_spec, bus_ids, baseMVA)[source]
Parameters:
  • dev_spec (numpy.ndarray) – The corresponding device row in the network file describing the network.

  • bus_ids (list of int) – The list of unique bus IDs.

  • baseMVA (int) – The base power of the network.

Methods

__init__(dev_spec, bus_ids, baseMVA)

param dev_spec:

The corresponding device row in the network file describing the

map_pq(p, q, delta_t)

Map (p, q) to the closest (P, Q) feasible power injection point.

update_soc(delta_t)

Update the state of charge based on the current power injection.

map_pq(p, q, delta_t)[source]

Map (p, q) to the closest (P, Q) feasible power injection point.

Parameters:
  • p (float) – The desired (P, Q) power injection point (p.u.).

  • q (float) – The desired (P, Q) power injection point (p.u.).

update_soc(delta_t)[source]

Update the state of charge based on the current power injection.

This function updates the new state of charge \(SoC_{t+1}\), assuming that the device injects self.p active power (in p.u.) into the network during delta_t hours.

Parameters:

delta_t (float) – Time interval between subsequent timesteps \(\Delta t\) (in fraction of hour).