create_measurement(net, meas_type, element_type, value, std_dev, bus, element=None, check_existing=True, index=None, name=None)¶
Creates a measurement, which is used by the estimation module. Possible types of measurements are: v, p, q, i
meas_type (string) - Type of measurement. “v”, “p”, “q”, “i” are possible.
element_type (string) - Clarifies which element is measured. “bus”, “line”, “transformer” are possible.
value (float) - Measurement value. Units are “kW” for P, “kVar” for Q, “p.u.” for V, “A” for I. Generation is a positive bus power injection, consumption negative.
std_dev (float) - Standard deviation in the same unit as the measurement.
bus (int) - Index of bus. Determines the position of the measurement for line/transformer measurements (bus == from_bus: measurement at from_bus; same for to_bus). The bus can also be “from” or “to” if the element_type is “line” or “hv”/”lv” if “transformer”.
element (int, None) - Index of measured element, if element_type is “line” or “transformer”.
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 behaviour.
name (str, None) - name of measurement.
- (int) Index of measurement
- 500 kW load measurement with 10 kW standard deviation on bus 0: create_measurement(net, “p”, “bus”, -500., 10., 0)
|Defines what physical quantity is measured|
|Defines which element type is equipped with the measurement|
|std_dev||float||Standard deviation (same unit as measurement)|
must be in
|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).|
must be in
|If the element_type is “line” or “transformer”, 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)|