Skip to content

Commit 6add297

Browse files
committed
Move microgrid docs to the module and reference it in the user guide
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 3f81f2c commit 6add297

File tree

2 files changed

+126
-135
lines changed

2 files changed

+126
-135
lines changed
Lines changed: 7 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,133 +1,9 @@
11
# Microgrid Concepts
22

3-
A {{glossary("microgrid")}} is a local electrical grid that connects a
4-
set of electrical components together. They are often built around a
5-
passive power consumer, to supplement the electricity consumed from
6-
the {{glossary("grid", "public grid")}}, with on-site power generation
7-
or storage systems.
8-
9-
Microgrids can also function in {{glossary("island", "island-mode")}},
10-
without a grid connection, or without a local power consumer, but they
11-
have to have at least one of the two, to be meaningful.
12-
13-
## Frequenz SDK Microgrid Model
14-
15-
The SDK aims to provide an abstract model of the microgrid that
16-
enables high-level interactions with {{glossary("component",
17-
"microgrid components")}}, without having to worry about (or even be
18-
aware of) location-specific details such as:
19-
20-
- where the {{glossary("meter", "meters")}} are placed,
21-
- how many {{glossary("battery", "batteries")}},
22-
- whether there's a grid connection or a passive consumer,
23-
- what models the {{glossary("inverter", "inverters")}} are,
24-
etc.
25-
- whether components are having downtimes, because
26-
{{glossary("metric", "metrics")}} and limits get adjusted
27-
automatically when components are having downtimes.
28-
29-
Users of the SDK can develop applications around this interface once
30-
and deploy anywhere, and the SDK will take care of translating the
31-
requests and instructions to correspond to the specific microgrid
32-
configurations.
33-
34-
``` mermaid
35-
flowchart LR
36-
37-
subgraph Left[Measurements only]
38-
direction LR
39-
grid["Grid Connection"]
40-
consumer["Consumer"]
41-
pv["PV Arrays"]
42-
chp["CHP"]
43-
end
44-
45-
junction(( ))
46-
47-
subgraph Right[Measurements and control]
48-
direction LR
49-
bat["Batteries"]
50-
ev["EV Chargers"]
51-
end
52-
53-
grid --- junction
54-
consumer --- junction
55-
pv --- junction
56-
chp --- junction
57-
58-
junction --- bat
59-
junction --- ev
60-
```
61-
62-
## Grid
63-
64-
This refers to a microgrid's connection to the external Grid. The
65-
power flowing through this connection can be streamed through
66-
[`grid_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.grid_power].
67-
68-
In locations without a grid connection, this method remains
69-
accessible, and streams zero values.
70-
71-
## Consumer
72-
73-
This is the main power consumer at the site of a microgrid, and often
74-
the {{glossary("load")}} the microgrid is built to support. The power
75-
drawn by the consumer is available through
76-
[`consumer_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.consumer_power]
77-
78-
In locations without a consumer, this method streams zero values.
79-
80-
## Producers: PV Arrays, CHP
81-
82-
The total {{glossary("pv", "PV")}} power production in a microgrid can
83-
be streamed through
84-
[`pv_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.pv_power]
85-
, and similarly the total CHP production in a site can be streamed
86-
through
87-
[`chp_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.chp_power].
88-
And total producer power is available through
89-
[`producer_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.producer_power].
90-
91-
As is the case with the other methods, if PV Arrays or CHPs are not
92-
available in a microgrid, the corresponding methods stream zero
93-
values.
94-
95-
## Batteries
96-
97-
The total Battery power is available through
98-
[`battery_pool`][frequenz.sdk.microgrid.battery_pool]'s
99-
[`power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.power].
100-
The battery pool by default uses all batteries available at a
101-
location, but battery pool instances can be created for subsets of
102-
batteries if necessary, by specifying the battery ids.
103-
104-
The `battery_pool` also provides
105-
[`soc`][frequenz.sdk.timeseries.battery_pool.BatteryPool.soc],
106-
[`capacity`][frequenz.sdk.timeseries.battery_pool.BatteryPool.capacity],
107-
[`temperature`][frequenz.sdk.timeseries.battery_pool.BatteryPool.temperature]
108-
and available power bounds through the
109-
[`power_status`][frequenz.sdk.timeseries.battery_pool.BatteryPool.power_status]
110-
method.
111-
112-
The `battery_pool` also provides control methods
113-
[`propose_power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_power]
114-
(which accepts values in the {{glossary("psc", "Passive Sign
115-
Convention")}} and supports both charging and discharging), or through
116-
[`propose_charge`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_charge],
117-
or
118-
[`propose_discharge`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_discharge].
119-
120-
## EV Chargers
121-
122-
The [`ev_charger_pool`][frequenz.sdk.microgrid.ev_charger_pool] offers
123-
a
124-
[`power`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.power]
125-
method that streams the total power measured for all the
126-
{{glossary("ev-charger", "EV Chargers")}} at a site.
127-
128-
It also offers a
129-
[`component_data`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.component_data]
130-
method for fetching the status of individual EV Chargers, including
131-
state changes like when an EV is connected or disconnected, and a
132-
[`set_bounds`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.set_bounds]
133-
method to limit the charge power of individual EV Chargers.
3+
::: frequenz.sdk.microgrid
4+
options:
5+
members: []
6+
show_bases: false
7+
show_root_heading: false
8+
show_root_toc_entry: false
9+
show_source: false

src/frequenz/sdk/microgrid/__init__.py

Lines changed: 119 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,126 @@
11
# License: MIT
22
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
"""Microgrid monitoring and control system.
4+
"""A {{glossary("microgrid")}} is a local electrical grid that connects a set of
5+
electrical components together. They are often built around a passive power consumer,
6+
to supplement the electricity consumed from the {{glossary("grid", "public grid")}} with
7+
on-site power generation or storage systems.
58
6-
This package provides a complete suite of data structures and functionality
7-
for monitoring and adjusting the state of a microgrid.
8-
"""
9+
Microgrids can also function in {{glossary("island", "island-mode")}}, without a grid
10+
connection, or without a local power consumer, but they have to have at least one of the
11+
two, to be meaningful.
12+
13+
## Frequenz SDK Microgrid Model
14+
15+
The SDK aims to provide an abstract model of the microgrid that enables high-level
16+
interactions with {{glossary("component", "microgrid components")}}, without having to
17+
worry about (or even be aware of) location-specific details such as:
18+
19+
- where the {{glossary("meter", "meters")}} are placed,
20+
- how many {{glossary("battery", "batteries")}},
21+
- whether there's a grid connection or a passive consumer,
22+
- what models the {{glossary("inverter", "inverters")}} are, etc.
23+
- whether components are having downtimes, because {{glossary("metric", "metrics")}} and
24+
limits get adjusted automatically when components are having downtimes.
25+
26+
Users of the SDK can develop applications around this interface once and deploy
27+
anywhere, and the SDK will take care of translating the requests and instructions to
28+
correspond to the specific microgrid configurations.
29+
30+
``` mermaid
31+
flowchart LR
32+
33+
subgraph Left[Measurements only]
34+
direction LR
35+
grid["Grid Connection"]
36+
consumer["Consumer"]
37+
pv["PV Arrays"]
38+
chp["CHP"]
39+
end
40+
41+
junction(( ))
42+
43+
subgraph Right[Measurements and control]
44+
direction LR
45+
bat["Batteries"]
46+
ev["EV Chargers"]
47+
end
48+
49+
grid --- junction
50+
consumer --- junction
51+
pv --- junction
52+
chp --- junction
53+
54+
junction --- bat
55+
junction --- ev
56+
```
57+
58+
## Grid
59+
60+
This refers to a microgrid's connection to the external Grid. The power flowing through
61+
this connection can be streamed through
62+
[`grid_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.grid_power].
63+
64+
In locations without a grid connection, this method remains accessible, and streams zero
65+
values.
66+
67+
## Consumer
68+
69+
This is the main power consumer at the site of a microgrid, and often the
70+
{{glossary("load")}} the microgrid is built to support. The power drawn by the consumer
71+
is available through
72+
[`consumer_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.consumer_power]
73+
74+
In locations without a consumer, this method streams zero values.
75+
76+
## Producers: PV Arrays, CHP
77+
78+
The total {{glossary("pv", "PV")}} power production in a microgrid can be streamed
79+
through [`pv_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.pv_power] , and
80+
similarly the total CHP production in a site can be streamed through
81+
[`chp_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.chp_power]. And total
82+
producer power is available through
83+
[`producer_power`][frequenz.sdk.timeseries.logical_meter.LogicalMeter.producer_power].
84+
85+
As is the case with the other methods, if PV Arrays or CHPs are not available in a
86+
microgrid, the corresponding methods stream zero values.
87+
88+
## Batteries
89+
90+
The total Battery power is available through
91+
[`battery_pool`][frequenz.sdk.microgrid.battery_pool]'s
92+
[`power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.power]. The battery pool by
93+
default uses all batteries available at a location, but battery pool instances can be
94+
created for subsets of batteries if necessary, by specifying the battery ids.
95+
96+
The `battery_pool` also provides
97+
[`soc`][frequenz.sdk.timeseries.battery_pool.BatteryPool.soc],
98+
[`capacity`][frequenz.sdk.timeseries.battery_pool.BatteryPool.capacity],
99+
[`temperature`][frequenz.sdk.timeseries.battery_pool.BatteryPool.temperature] and
100+
available power bounds through the
101+
[`power_status`][frequenz.sdk.timeseries.battery_pool.BatteryPool.power_status] method.
102+
103+
The `battery_pool` also provides control methods
104+
[`propose_power`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_power] (which
105+
accepts values in the {{glossary("psc", "Passive Sign Convention")}} and supports both
106+
charging and discharging), or through
107+
[`propose_charge`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_charge], or
108+
[`propose_discharge`][frequenz.sdk.timeseries.battery_pool.BatteryPool.propose_discharge].
109+
110+
## EV Chargers
111+
112+
The [`ev_charger_pool`][frequenz.sdk.microgrid.ev_charger_pool] offers a
113+
[`power`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.power] method that
114+
streams the total power measured for all the {{glossary("ev-charger", "EV Chargers")}}
115+
at a site.
116+
117+
It also offers a
118+
[`component_data`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.component_data]
119+
method for fetching the status of individual EV Chargers, including state changes like
120+
when an EV is connected or disconnected, and a
121+
[`set_bounds`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.set_bounds] method
122+
to limit the charge power of individual EV Chargers.
123+
""" # noqa: D205, D400
9124

10125
from ..actor import ResamplerConfig
11126
from . import _data_pipeline, client, component, connection_manager, fuse, grid

0 commit comments

Comments
 (0)