Measurement
Create Function
- pandapower.create.create_measurement(net, meas_type, element_type, value, std_dev, element, side=None, check_existing=False, index=None, name=None, **kwargs)
Creates a measurement, which is used by the estimation module. Possible types of measurements are: v, p, q, i, va, ia
- Parameters:
net (pandapowerNet) – the network to which the measurement will be added
meas_type (Literal['v', 'p', 'q', 'i', 'va', 'ia']) – Type of measurement. “v”, “p”, “q”, “i”, “va” and “ia” are possible
element_type (Literal['bus', 'line', 'trafo', 'trafow3', 'load', 'gen', 'sgen', 'shunt', 'ward', 'xward', 'ext_grid']) – Clarifies which element is measured. “bus”, “line”, “trafo”, “trafo3w”, “load”, “gen”, “sgen”, “shunt”, “ward”, “xward” and “ext_grid” are possible
value (float) – Measurement value.
std_dev (float) – Standard deviation in the same unit as the measurement
element (int) – Index of the measured element
side (int | Literal['from', 'to', 'hv', 'mv', 'lv'] | None) – Only used for line or trafo(3w). Side defines at which point of the element the measurement is gathered. For lines this may be “from”, “to” to denote the side with the from_bus or to_bus. It can also be the index of the from_bus or to_bus. For trafo(3w), it can be “hv”, (“mv”), “lv” or the corresponding bus index, respectively.
check_existing (bool) – Check for and replace existing measurements for this bus, type and element_type. Set it to False for performance improvements which can cause unsafe behavior.
index (int | integer | None) – Index of the measurement in the measurement table. Should not exist already.
name (str | None) – Name of measurement
- Returns:
Index of the created measurement
- Return type:
int | integer
Example
2 MW load measurement with 0.05 MW standard deviation on bus 0:
>>> create_measurement(net, "p", "bus", 2., 0.05., 0)
4.5 MVar line measurement with 0.1 MVAr standard deviation on the “to_bus” side of line 2:
>>> create_measurement(net, "q", "line", 4.5, 0.1, 2, "to")
Table Structure
net.measurement
Parameter |
Datatype |
Value Range |
Explanation |
nullable |
required |
|---|---|---|---|---|---|
name |
Name of measurement |
✓ |
✓ |
||
measurement_type |
string |
[‘p’, ‘q’, ‘i’, ‘v’] |
Defines what physical quantity is measured |
✓ |
|
element_type |
string |
[‘bus’, ‘line’, ‘trafo’, ‘trafo3w’, ‘load’, ‘gen’, ‘sgen’, ‘shunt’, ‘ward’, ‘xward’, ‘ext_grid’] |
Defines which element type is equipped with the measurement |
✓ |
|
value |
float |
Measurement value |
✓ |
||
std_dev |
float |
Standard deviation (same unit as measurement) |
✓ |
||
element |
int |
Element is the index of the element in net[element_type]. |
✓ |
||
side |
[‘from’, ‘to’, ‘hv’, ‘mv’, ‘lv’] |
Used for element_type line, trafo or trafo3w. Defines where the measurement is gathered. |
✓ |
✓ |