Manage Standard Types
Show all Available Standard Types
- pandapower.available_std_types(net, element='line')
Returns all standard types available for this network as a table.
- INPUT:
net - pandapower Network
element - type of element (“line” or “trafo”)
- OUTPUT:
typedata - table of standard type parameters
Create Standard Type
- pandapower.create_std_type(net, data, name, element='line', overwrite=True, check_required=True)
Creates type data in the type database. The parameters that are used for the loadflow have to be at least contained in data. These parameters are:
c_nf_per_km, r_ohm_per_km, x_ohm_per_km and max_i_ka (for lines)
sn_mva, vn_hv_kv, vn_lv_kv, vk_percent, vkr_percent, pfe_kw, i0_percent, shift_degree* (for transformers)
- sn_hv_mva, sn_mv_mva, sn_lv_mva, vn_hv_kv, vn_mv_kv, vn_lv_kv, vk_hv_percent, vk_mv_percent, vk_lv_percent,
vkr_hv_percent, vkr_mv_percent, vkr_lv_percent, pfe_kw, i0_percent, shift_mv_degree*, shift_lv_degree* (for 3-winding-transformers)
additional parameters can be added and later loaded into pandapower with the function “parameter_from_std_type”.
** only considered in loadflow if calculate_voltage_angles = True
The standard type is saved into the pandapower library of the given network by default.
- INPUT:
net - The pandapower network
data - dictionary of standard type parameters
name - name of the standard type as string
element - “line”, “trafo” or “trafo3w”
EXAMPLE:
>>> line_data = {"c_nf_per_km": 0, "r_ohm_per_km": 0.642, "x_ohm_per_km": 0.083, "max_i_ka": 0.142, "type": "cs", "q_mm2": 50, "alpha": 4.03e-3} >>> pandapower.create_std_type(net, line_data, "NAYY 4×50 SE", element='line') >>> # Three phase line creation: >>> pandapower.create_std_type(net, {"r_ohm_per_km": 0.1941, "x_ohm_per_km": 0.07476991, "c_nf_per_km": 1160., "max_i_ka": 0.421, "endtemp_degree": 70.0, "r0_ohm_per_km": 0.7766, "x0_ohm_per_km": 0.2990796, "c0_nf_per_km": 496.2}, name="unsymmetric_line_type",element = "line") >>> #Three phase transformer creation >>> pp.create_std_type(net, {"sn_mva": 1.6, "vn_hv_kv": 10, "vn_lv_kv": 0.4, "vk_percent": 6, "vkr_percent": 0.78125, "pfe_kw": 2.7, "i0_percent": 0.16875, "shift_degree": 0, "vector_group": vector_group, "tap_side": "lv", "tap_neutral": 0, "tap_min": -2, "tap_max": 2, "tap_step_degree": 0, "tap_step_percent": 2.5, "tap_phase_shifter": False, "vk0_percent": 6, "vkr0_percent": 0.78125, "mag0_percent": 100, "mag0_rx": 0., "si0_hv_partial": 0.9,}, name='Unsymmetric_trafo_type', element="trafo")
- pandapower.create_std_types(net, data, element='line', overwrite=True, check_required=True)
Creates multiple standard types in the type database.
- INPUT:
net - The pandapower network
data - dictionary of standard type parameter sets
element - “line”, “trafo” or “trafo3w”
EXAMPLE:
>>> linetypes = {"typ1": {"r_ohm_per_km": 0.01, "x_ohm_per_km": 0.02, "c_nf_per_km": 10, "max_i_ka": 0.4, "type": "cs"}, >>> "typ2": {"r_ohm_per_km": 0.015, "x_ohm_per_km": 0.01, "c_nf_per_km": 30, "max_i_ka": 0.3, "type": "cs"}} >>> pp.create_std_types(net, data=linetypes, element="line")
Adds zero sequence impedance parameters to net
- pandapower.add_zero_impedance_parameters(net)
Adds all parameters required for zero sequence impedance calculations.
- INPUT:
net - pandapower network
zero sequence parameters of lines and transformers in pandapower networks are entered using std_type.
This function adds them to the pandas dataframe
- OUTPUT:
Now, net has all the zero sequence parameters
Copy Standard Types
- pandapower.copy_std_types(to_net, from_net, element='line', overwrite=True)
Transfers all standard types of one network to another.
INPUT:
to_net - The pandapower network to which the standard types are copied
from_net - The pandapower network from which the standard types are taken
element - “line” or “trafo”
overwrite - if True, overwrites standard types which already exist in to_net
Load Standard Types
- pandapower.load_std_type(net, name, element='line')
Loads standard type data from the linetypes data base. Issues a warning if linetype is unknown.
- INPUT:
net - The pandapower network
name - name of the standard type as string
element - “line”, “trafo” or “trafo3w”
- OUTPUT:
typedata - dictionary containing type data
Check if Standard Type Exists
- pandapower.std_type_exists(net, name, element='line')
Checks if a standard type exists.
- INPUT:
net - pandapower Network
name - name of the standard type as string
element - type of element (“line” or “trafo”)
- OUTPUT:
exists - True if standard type exists, False otherwise
Change Standard Type
- pandapower.change_std_type(net, eid, name, element='line')
Changes the type of a given element in pandapower. Changes only parameter that are given for the type.
- INPUT:
net - pandapower network
eid - element index (either line or transformer index)
element - type of element (“line” or “trafo”)
name - name of the new standard type
Load Additional Parameter from Library
- pandapower.parameter_from_std_type(net, parameter, element='line', fill=None)
Loads standard types data for a parameter, which can be used to add an additional parameter, that is not included in the original pandapower datastructure but is available in the standard type database.
- INPUT:
net - pandapower network
parameter - name of parameter as string
element - type of element (“line” or “trafo”)
- fill - fill-value that is assigned to all lines/trafos without
a value for the parameter, either because the line/trafo has no type or because the type does not have a value for the parameter
- EXAMPLE:
import pandapower as pp import pandapower.networks as pn
net = pn.simple_mv_open_ring_net() pp.parameter_from_std_type(net, “q_mm2”)
Find Standard Type
- pandapower.find_std_type_by_parameter(net, data, element='line', epsilon=0.0)
Searches for a std_type that fits all values given in the data dictionary with the margin of epsilon.
- INPUT:
net - pandapower network
data - dictionary of standard type parameters
element - type of element (“line” or “trafo”)
epsilon - tolerance margin for parameter comparison
- OUTPUT:
fitting_types - list of fitting types or empty list
Delete Standard Type
- pandapower.delete_std_type(net, name, element='line')
Deletes standard type parameters from database.
- INPUT:
net - pandapower Network
name - name of the standard type as string
element - type of element (“line” or “trafo”)