Load
Note
Loads should always have a positive p_mw value, since all power values are given in the consumer system. If you want to model constant generation, use a Static Generator (sgen element) instead of a negative load.
See also
Create Function
- pandapower.create.create_load(net, bus, p_mw, q_mvar=0, const_z_p_percent=0, const_i_p_percent=0, const_z_q_percent=0, const_i_q_percent=0, sn_mva=nan, name=None, scaling=1.0, index=None, in_service=True, type='wye', max_p_mw=nan, min_p_mw=nan, max_q_mvar=nan, min_q_mvar=nan, controllable=nan, **kwargs)
Adds one load in table net[“load”].
All loads are modelled in the consumer system, meaning load is positive and generation is negative active power. Please pay attention to the correct signing of the reactive power as well.
- Parameters:
net (pandapowerNet) – The net within this load should be created
bus (int | integer) – The bus id to which the load is connected
p_mw (float) –
The active power of the load
positive value -> load
negative value -> generation
q_mvar (float) – The reactive power of the load
const_z_p_percent (float) – percentage of p_mw that will be associated to constant impedance load at rated voltage
const_i_p_percent (float) – percentage of p_mw that will be associated to constant current load at rated voltage
const_z_q_percent (float) – percentage of q_mvar that will be associated to constant impedance load at rated voltage
const_i_q_percent (float) – percentage of q_mvar that will be associated to constant current load at rated voltage
sn_mva (float) – Nominal power of the load
name (str | None) – The name for this load
scaling (float) – An OPTIONAL scaling factor. Multiplies with p_mw and q_mvar.
type (Literal['wye', 'delta']) – type variable to classify the load: wye/delta
index (int | integer | None) – Force a specified ID if it is available. If None, the index one higher than the highest already existing index is selected.
in_service (bool) – True for in_service or False for out of service
max_p_mw (float) – Maximum active power load - necessary for controllable loads in for OPF
min_p_mw (float) – Minimum active power load - necessary for controllable loads in for OPF
max_q_mvar (float) – Maximum reactive power load - necessary for controllable loads in for OPF
min_q_mvar (float) – Minimum reactive power load - necessary for controllable loads in OPF
controllable (bool | float) – States, whether a load is controllable or not. Only respected for OPF; defaults to False if “controllable” column exists in DataFrame
- Returns:
The ID of the created load
- Return type:
int | integer
Example
>>> create_load(net, bus=0, p_mw=10., q_mvar=2.)
- pandapower.create.create_loads(net, buses, p_mw, q_mvar=0, const_z_p_percent=0, const_i_p_percent=0, const_z_q_percent=0, const_i_q_percent=0, sn_mva=nan, name=None, scaling=1.0, index=None, in_service=True, type='wye', max_p_mw=nan, min_p_mw=nan, max_q_mvar=nan, min_q_mvar=nan, controllable=nan, **kwargs)
Adds a number of loads in table net[“load”].
All loads are modelled in the consumer system, meaning load is positive and generation is negative active power. Please pay attention to the correct signing of the reactive power as well.
- Parameters:
net (pandapowerNet) – The net within this load should be created
buses (Sequence) – A list of bus ids to which the loads are connected
p_mw (float | Iterable[float]) –
The active power of the loads
positive value -> load
negative value -> generation
q_mvar (float | Iterable[float]) – The reactive power of the loads
const_z_p_percent (float | Iterable[float]) – percentage of p_mw that will be associated to constant impedance loads at rated voltage
const_i_p_percent (float | Iterable[float]) – percentage of p_mw that will be associated to constant current load at rated voltage
const_z_q_percent (float | Iterable[float]) – percentage of q_mvar that will be associated to constant impedance loads at rated voltage
const_i_q_percent (float | Iterable[float]) – percentage of q_mvar that will be associated to constant current load at rated voltage
sn_mva (float | Iterable[float]) – Nominal power of the loads
name (Iterable[str] | None) – The name for this load
scaling (float | Iterable[float]) – An OPTIONAL custom scaling factor. Multiplies with p_mw and q_mvar.
type (Literal['wye', 'delta']) – type variable to classify the load
index (int | integer | Iterable[int | integer] | None) – Force a specified ID if it is available. If None, the index is set to a range between one higher than the highest already existing index and the length of loads that shall be created.
in_service (bool | Iterable[bool]) – True for in_service or False for out of service
max_p_mw (float | Iterable[float]) – Maximum active power load - necessary for controllable loads in for OPF
min_p_mw (float | Iterable[float]) – Minimum active power load - necessary for controllable loads in for OPF
max_q_mvar (float | Iterable[float]) – Maximum reactive power load - necessary for controllable loads in for OPF
min_q_mvar (float | Iterable[float]) – Minimum reactive power load - necessary for controllable loads in OPF
controllable (bool | Iterable[bool] | float) – States, whether a load is controllable or not. Only respected for OPF Defaults to False if “controllable” column exists in DataFrame
- Returns:
The IDs of the created loads
- Return type:
ndarray[tuple[Any, …], dtype[int | integer]]
Example
>>> create_loads(net, buses=[0, 2], p_mw=[10., 5.], q_mvar=[2., 0.])
- pandapower.create.create_load_from_cosphi(net, bus, sn_mva, cos_phi, mode, **kwargs)
Creates a load element from rated power and power factor cos(phi).
- Parameters:
net (pandapowerNet) – The net within this static generator should be created
bus (int | integer) – The bus id to which the load is connected
sn_mva (float) – rated power of the load
cos_phi (float) – power factor cos_phi
mode (Literal['underexcited', 'overexcited']) –
“underexcited” (Q absorption, decreases voltage)
”overexcited” (Q injection, increases voltage)
**kwargs – any parameter from create_load, as these get passed to the create_load function
- Returns:
The ID of the created load
- Return type:
int | integer
Load elements are modeled from a consumer point of view. Active power will therefore always be positive, reactive power will be positive for underexcited behavior (Q absorption, decreases voltage) and negative for overexcited behavior (Q injection, increases voltage).
Input Parameters
net.load
Parameter |
Datatype |
Value Range |
Explanation |
name |
string |
name of the load |
|
bus * |
integer |
index of connected bus |
|
p_mw* |
float |
\(\geq 0\) |
active power of the load [MW] |
q_mvar* |
float |
reactive power of the load [MVar] |
|
const_z_p_percent* |
float |
\([0,100]\) |
percentage of p_mw that is associated to constant impedance load at rated voltage [\(\%\)] |
const_i_p_percent* |
float |
\([0,100]\) |
percentage of p_mw that is associated to constant current load at rated voltage [\(\%\)] |
const_z_q_percent* |
float |
\([0,100]\) |
percentage of q_mvar that is associated to constant impedance load at rated voltage [\(\%\)] |
const_i_q_percent* |
float |
\([0,100]\) |
percentage of q_mvar that is associated to constant current load at rated voltage [\(\%\)] |
sn_mva |
float |
\(>0\) |
rated power of the load [kVA] |
scaling * |
float |
\(\geq 0\) |
scaling factor for active and reactive power |
in_service* |
boolean |
True / False |
specifies if the load is in service. |
type* |
String |
wye/delta |
Connection Type of 3 Phase Load(Valid for three phase load flow only) |
controllable** |
bool |
States if load is controllable or not, load will not be used as a flexibilty if it is not controllable |
|
max_p_mw** |
float |
Maximum active power |
|
min_p_mw** |
float |
Minimum active power |
|
max_q_mvar** |
float |
Maximum reactive power |
|
min_q_mvar** |
float |
Minimum reactive power |
*necessary for executing a power flow calculation.
Note
The apparent power value sn_mva is provided as additional information for usage in controller or other applications based on pandapower. It is not considered in the power flow!
Electric Model
Loads are modelled as PQ-buses in the power flow calculation, with an option to use the so-called ZIP load model, where a load is represented as a composition of constant power (P), constant current (I) and constant impedance (Z):
What part of the load is considered constant with constant power, constant current or constant impedance is defined as follows. This is considered separately for active and reactive power:
The load power values are then defines as:
Result Parameters
net.res_load
Parameter |
Datatype |
Explanation |
p_mw |
float |
resulting active power demand after scaling and after considering voltage dependence [MW] |
q_mvar |
float |
resulting reactive power demand after scaling and after considering voltage dependence [MVar] |
The power values in the net.res_load table are equivalent to \(P_{load}\) and \(Q_{load}\).