create_dcline(net, from_bus, to_bus, p_kw, loss_percent, loss_kw, vm_from_pu, vm_to_pu, index=None, name=None, max_p_kw=nan, min_q_from_kvar=nan, min_q_to_kvar=nan, max_q_from_kvar=nan, max_q_to_kvar=nan, in_service=True)¶
Creates a dc line.
from_bus (int) - ID of the bus on one side which the line will be connected with
to_bus (int) - ID of the bus on the other side which the line will be connected with
p_kw - (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.
loss_percent - (float) Standard deviation in the same unit as the measurement.
loss_kw - (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)
vm_from_pu - (int, None) Index of measured element, if element_type is “line” or “transformer”.
vm_to_pu - (int, None) Index of measured element, if element_type is “line” or “transformer”.
index (int, None) - Force a specified ID if it is available. If None, the index one higher than the highest already existing index is selected.
name (str, None) - A custom name for this dc line
in_service (boolean) - True for in_service or False for out of service
- index (int) - The unique ID of the created element
- create_dcline(net, from_bus=0, to_bus=1, p_kw=1e4, loss_percent=1.2, loss_kw=25, vm_from_pu=1.01, vm_to_pu=1.02)
|name||string||name of the generator|
|from_bus*||integer||Index of bus where the dc line starts|
|to_bus*||integer||Index of bus where the dc line ends|
|p_kw*||float||\(>\) 0||Active power transmitted from ‘from_bus’ to ‘to_bus’|
|loss_percent*||float||\(>\) 0||Relative transmission loss in percent of active power transmission|
|loss_kw*||float||\(>\) 0||Total transmission loss in kW|
|vm_from_pu*||float||\(>\) 0||Voltage setpoint at from bus|
|vm_to_pu*||float||\(>\) 0||Voltage setpoint at to bus|
|max_p_kw**||float||\(>\) 0||Maximum active power transmission|
|min_q_from_kvar**||float||Minimum reactive power at from bus|
|max_q_from_kvar**||float||Maximum reactive power at from bus|
|min_q_to_kvar**||float||Minimum reactive power at to bus|
|max_q_to_kvar**||float||Maximum reactive power at to bus|
|in_service*||bool||True/False||specifies if DC line is in service|
*necessary for executing a power flow calculation
**optimal power flow parameter
DC line is only able to model one-directional loadflow for now, which is why p_kw / max_p_kw have to be > 0.
A DC line is modelled as two generators in the loadflow:
The active power at the from side is defined by the parameters in the dcline table. The active power at the to side is equal to the active power on the from side minus the losses of the DC line.
The voltage control with reactive power works just as described for the generator model. Maximum and Minimum reactive power limits are considered in the OPF, and in the PF if it is run with enforce_q_lims=True.
|p_from_kw||float||active power flow into the line at ‘from_bus’ [kW]|
|q_from_kvar||float||reactive power flow into the line at ‘from_bus’ [kVar]|
|p_to_kw||float||active power flow into the line at ‘to_bus’ [kW]|
|q_to_kvar||float||reactive power flow into the line at ‘to_bus’ [kVar]|
|pl_kw||float||active power losses of the line [kW]|
|vm_from_pu||float||voltage magnitude at ‘from_bus’ [p.u]|
|va_from_degree||float||voltage angle at ‘from_bus’ [degree]|
|vm_to_pu||float||voltage magnitude at ‘to_bus’ [p.u]|
|va_to_degree||float||voltage angle at ‘to_bus’ [degree]|