Measurement
Create Function
- pandapower.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
- INPUT:
meas_type (str) - Type of measurement. “v”, “p”, “q”, “i”, “va” and “ia” are possible
element_type (str) - Clarifies which element is measured. “bus”, “line”, “trafo”, “trafo3w”, “load”, “gen”, “sgen”, “shunt”, “ward”, “xward” and “ext_grid” are possible
value (float) - Measurement value. Units are “MW” for P, “MVAr” for Q, “p.u.” for V, “kA” for I. Bus power measurement is in load reference system, which is consistent to the rest of pandapower.
std_dev (float) - Standard deviation in the same unit as the measurement
element (int) - Index of the measured element
side (int or str, default: None) - Only used for measured lines or transformers. Side defines at which end of the branch 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 transformers, it can be “hv”, “mv” or “lv” or the corresponding bus index, respectively.
- OPTIONAL:
check_existing (bool, default: None) - 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, default: None) - Index of the measurement in the measurement table. Should not exist already.
name (str, default: None) - Name of measurement
- OUTPUT:
index (int) - Index of the created measurement
- EXAMPLES:
2 MW load measurement with 0.05 MW standard deviation on bus 0: create_measurement(net, “p”, “bus”, 0, 2., 0.05.)
4.5 MVar line measurement with 0.1 MVAr standard deviation on the “to_bus” side of line 2: create_measurement(net, “q”, “line”, 2, 4.5, 0.1, “to”)
Input Parameters
net.measurement
Parameter |
Datatype |
Value Range |
Explanation |
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) |
|
bus |
int |
must be in
net.bus.index
|
Defines the bus at which the measurement is placed. For line or transformer measurement, it defines the side at which the measurement is placed (from_bus or to_bus). |
element |
int |
must be an existing element index |
If the element_type is “line”, “trafo”, “trafo3w”, “load”, “gen”, “sgen”, “shunt”, “ward”, “xward” or “ext_grid”, element is the index of the relevant element. For “bus” measurements, it is None (default) |
check_existing |
bool |
Checks if a measurement of the type already exists and overwrites it. If set to False, the measurement may be added twice (unsafe behaviour), but the performance increases |
|
index |
int |
Defines a specific index for the new measurement (if possible) |