|
137 | 137 | [`propose_power`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.propose_power], |
138 | 138 | which accepts values in the {{glossary("psc", "Passive Sign Convention")}} and supports |
139 | 139 | only charging. |
| 140 | +
|
| 141 | +# Component pools |
| 142 | +
|
| 143 | +The SDK provides a unified interface for interacting with sets of Batteries, EV |
| 144 | +chargers and PV arrays, through their corresponding `Pool`s. |
| 145 | +
|
| 146 | +| pool type | constructor | |
| 147 | +|---------------|---------------------------------------------------------------------| |
| 148 | +| BatteryPool | [microgrid.battery_pool][frequenz.sdk.microgrid.battery_pool] | |
| 149 | +| EVChargerPool | [microgrid.ev_charger_pool][frequenz.sdk.microgrid.ev_charger_pool] | |
| 150 | +| PVPool | [microgrid.pv_pool][frequenz.sdk.microgrid.pv_pool] | |
| 151 | +
|
| 152 | +All of them provide support for streaming aggregated data and for setting the |
| 153 | +power values of the components. |
| 154 | +
|
| 155 | +## Streaming component data |
| 156 | +
|
| 157 | +All pools have a `power` property, which is a |
| 158 | +[`FormulaEngine`][frequenz.sdk.timeseries.formula_engine.FormulaEngine] that can |
| 159 | +
|
| 160 | +- provide a stream of resampled power values, which correspond to the sum of the |
| 161 | +power measured from all the components in the pool together. |
| 162 | +
|
| 163 | +- be composed with other power streams to for composite formulas. |
| 164 | +
|
| 165 | +In addition, the battery pool has some additional properties that can be used as |
| 166 | +streams for metrics specific to batteries: |
| 167 | +[`soc`][frequenz.sdk.timeseries.battery_pool.BatteryPool.soc], |
| 168 | +[`capacity`][frequenz.sdk.timeseries.battery_pool.BatteryPool.capacity] and |
| 169 | +[`temperature`][frequenz.sdk.timeseries.battery_pool.BatteryPool.temperature]. |
| 170 | +
|
| 171 | +## Setting power |
| 172 | +
|
| 173 | +All pools provide a `propose_power` method for setting power for the pool. This |
| 174 | +would then be distributed to the individual components in the pool, using an |
| 175 | +algorithm that's suitable for the category of the components. For example, when |
| 176 | +controlling batteries, power could be distributed based on the `SoC` of the |
| 177 | +individual batteries, to keep the batteries in balance. |
| 178 | +
|
| 179 | +### Resolving conflicting power proposals |
| 180 | +
|
| 181 | +When there are multiple actors trying to control the same set of batteries, a |
| 182 | +target power is calculated based on the priorities of the actors making the |
| 183 | +requests. Actors need to specify their priorities as parameters when creating |
| 184 | +the `*Pool` instances using the constructors mentioned above. |
| 185 | +
|
| 186 | +The algorithm used for resolving power conflicts based on actor priority can be |
| 187 | +found in the documentation for any of the |
| 188 | +[`propose_power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_power] |
| 189 | +methods. |
140 | 190 | """ # noqa: D205, D400 |
141 | 191 |
|
142 | 192 | from ..actor import ResamplerConfig |
|
0 commit comments