Line DC

Create Function

DC lines can be either created from the standard type library (create_line_dc) or with custom values (create_line_dc_from_parameters).

pandapower.create_line_dc(net, from_bus_dc, to_bus_dc, length_km, std_type, name=None, index=None, geodata=None, df=get_default_value('line', 'df'), parallel=get_default_value('line', 'parallel'), in_service=get_default_value('line', 'in_service'), max_loading_percent=nan, alpha=nan, temperature_degree_celsius=nan, **kwargs)

Creates a line element in net[“line_dc”] The line_dc parameters are defined through the standard type library.

Parameters:
  • net (pandapowerNet) – The net within this line should be created

  • from_bus_dc (int | integer) – ID of the bus_dc on one side which the line will be connected with

  • to_bus_dc (int | integer) – ID of the bus_dc on the other side which the line will be connected with

  • length_km (float) – The line length in km

  • std_type (str) – Name of a standard line type: - Pre-defined in standard_linetypes - Customized std_type made using create_std_type()

  • name (str | None) – A custom name for this line_dc

  • 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.

  • geodata (Iterable[tuple[float, float]] | None) – The line geodata of the line_dc. The first row should be the coordinates of bus a and the last should be the coordinates of bus b. The points in the middle represent the bending points of the line

  • in_service (bool) – True for in_service or False for out of service

  • df (float) – derating factor, maximum current of line_dc in relation to nominal current of line (from 0 to 1)

  • parallel (int) – number of parallel line systems

  • max_loading_percent (float) – maximum current loading (only needed for OPF)

  • alpha (float) – temperature coefficient of resistance: R(T) = R(T_0) * (1 + alpha * (T - T_0))

  • temperature_degree_celsius (float) – line temperature for which line resistance is adjusted

Keyword Arguments:
  • tdpf (bool) – whether the line is considered in the TDPF calculation

  • wind_speed_m_per_s (float) – wind speed at the line in m/s (TDPF)

  • wind_angle_degree (float) – angle of attack between the wind direction and the line (TDPF)

  • conductor_outer_diameter_m (float) – outer diameter of the line conductor in m (TDPF)

  • air_temperature_degree_celsius (float) – ambient temperature in °C (TDPF)

  • reference_temperature_degree_celsius (float) – reference temperature in °C for which r_ohm_per_km for the line_dc is specified (TDPF)

  • solar_radiation_w_per_sq_m (float) – solar radiation on horizontal plane in W/m² (TDPF)

  • solar_absorptivity (float) – Albedo factor for absorptivity of the lines (TDPF)

  • emissivity (float) – Albedo factor for emissivity of the lines (TDPF)

  • r_theta_kelvin_per_mw (float) – thermal resistance of the line (TDPF, only for simplified method)

  • mc_joule_per_m_k (float) – specific mass of the conductor multiplied by the specific thermal capacity of the material (TDPF, only for thermal inertia consideration with tdpf_delay_s parameter)

Returns:

The ID of the created dc line

Return type:

int | integer

Example

>>> create_line_dc(net, from_bus_dc=0, to_bus_dc=1, length_km=0.1,  std_type="NAYY 4x50 SE", name="line_dc1")
pandapower.create_line_dc_from_parameters(net, from_bus_dc, to_bus_dc, length_km, r_ohm_per_km, max_i_ka, name=None, index=None, type=None, geodata=None, in_service=get_default_value('line_dc', 'in_service'), df=get_default_value('line_dc', 'df'), parallel=get_default_value('line_dc', 'parallel'), max_loading_percent=nan, alpha=nan, temperature_degree_celsius=nan, g_us_per_km=get_default_value('line_dc', 'g_us_per_km'), **kwargs)

Creates a dc line element in net[“line_dc”] from dc line parameters.

Parameters:
  • net (pandapowerNet) – The net within this dc line should be created

  • from_bus_dc (int | integer) – ID of the dc bus on one side which the dc line will be connected with

  • to_bus_dc (int | integer) – ID of the dc bus on the other side which the dc line will be connected with

  • length_km (float) – The dc line length in km

  • r_ohm_per_km (float) – dc line resistance in ohm per km

  • max_i_ka (float) – maximum thermal current in kilo Ampere

  • name (str | None) – A custom name for this line

  • 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

  • type (Literal['ol', 'cs'] | None) – type of dc line (“ol” for overhead dc line or “cs” for cable system)

  • df (float) – derating factor: maximum current of dc line in relation to nominal current of line (from 0 to 1)

  • g_us_per_km (float) – dielectric conductance in micro Siemens per km

  • g0_us_per_km – zero sequence dielectric conductance in micro Siemens per km

  • parallel (int) – number of parallel line systems

  • geodata (Iterable[tuple[float, float]] | None) – The linegeodata of the dc line. The first row should be the coordinates of dc bus a and the last should be the coordinates of dc bus b. The points in the middle represent the bending points of the line

  • max_loading_percent (float) – maximum current loading (only needed for OPF)

  • alpha (float) – temperature coefficient of resistance: R(T) = R(T_0) * (1 + alpha * (T - T_0)))

  • temperature_degree_celsius (float) – line temperature for which line resistance is adjusted

Keyword Arguments:
  • tdpf – whether the line is considered in the TDPF calculation

  • wind_speed_m_per_s – wind speed at the line in m/s (TDPF)

  • wind_angle_degree – angle of attack between the wind direction and the line (TDPF)

  • conductor_outer_diameter_m – outer diameter of the line conductor in m (TDPF)

  • air_temperature_degree_celsius – ambient temperature in °C (TDPF)

  • reference_temperature_degree_celsius – reference temperature in °C for which r_ohm_per_km for the line is specified (TDPF)

  • solar_radiation_w_per_sq_m – solar radiation on horizontal plane in W/m² (TDPF)

  • solar_absorptivity – Albedo factor for absorptivity of the lines (TDPF)

  • emissivity – Albedo factor for emissivity of the lines (TDPF)

  • r_theta_kelvin_per_mw – thermal resistance of the line (TDPF, only for simplified method)

  • mc_joule_per_m_k – specific mass of the conductor multiplied by the specific thermal capacity of the material (TDPF, only for thermal inertia consideration with tdpf_delay_s parameter)

Returns:

The ID of the created line

Return type:

int | integer

Example

>>> create_line_dc_from_parameters(
>>>   net, from_bus_dc=0, to_bus_dc=1, length_km=0.1, r_ohm_per_km=.01, max_i_ka=0.4, name="line_dc1"
>>> )

Table Structure

net.line_dc

Parameter

Datatype

Value Range

Explanation

nullable

required

optimal power flow

tdpf

name

name of the dc line

✓

std_type

standard type which can be used to easily define dc line parameters with the pandapower standard type library

✓

from_bus_dc

int

>=0

Index of dc bus where the dc line starts

✓

to_bus_dc

int

>=0

Index of dc bus where the dc line ends

✓

length_km

float

>0

length of the line [km]

✓

r_ohm_per_km

float

>=0

resistance of the line [Ohm per km]

✓

g_us_per_km

float

>=0

dielectric conductance of the dc line [micro Siemens per km]

✓

max_i_ka

float

>=0

maximal thermal current [kilo Ampere]

✓

parallel

int

>=1

number of parallel dc line systems

✓

df

float

[0, 1]

derating factor (scaling) for max_i_ka

✓

type

type of dc line Naming conventions: “”ol”” - overhead dc line, “”cs”” - underground cable system”

✓

max_loading_percent

float

>0

Maximum loading of the dc line

✓

✓

in_service

bool

specifies if the dc line is in service.

✓

geo

geojson.LineString object or its string representation

✓

alpha

float

temperature coefficient of resistance: R(T) = R(T_0) * (1 + alpha * (T - T_0))

✓

temperature_degree_celsius

float

line temperature for which line resistance is adjusted

✓

tdpf

bool

whether the line is considered in the TDPF calculation

✓

✓

wind_speed_m_per_s

float

wind speed at the line in m/s (TDPF)

✓

✓

wind_angle_degree

float

angle of attack between the wind direction and the line (TDPF)

✓

✓

conductor_outer_diameter_m

float

outer diameter of the line conductor in m (TDPF)

✓

✓

air_temperature_degree_celsius

float

ambient temperature in °C (TDPF)

✓

✓

reference_temperature_degree_celsius

float

reference temperature in °C for which r_ohm_per_km for the line_dc is specified (TDPF)

✓

✓

solar_radiation_w_per_sq_m

float

solar radiation on horizontal plane in W/m² (TDPF)

✓

✓

solar_absorptivity

float

Albedo factor for absorptivity of the lines (TDPF)

✓

✓

emissivity

float

Albedo factor for emissivity of the lines (TDPF)

✓

✓

r_theta_kelvin_per_mw

float

thermal resistance of the line (TDPF, only for simplified method)

✓

✓

mc_joule_per_m_k

float

specific mass of the conductor multiplied by the specific thermal capacity of the material (TDPF, only for thermal inertia consideration with tdpf_delay_s parameter)

✓

✓

*necessary for executing a balanced power flow calculation

Note

Defining a dc line with length zero leads to a division by zero in the power flow and is therefore not allowed. DC lines with a very low impedance might lead to convergence problems in the power flow for the same reason. If you want to directly connect two dc buses, please use the switch_dc element instead of a dc line with a small impedance!

Electric Model

DC lines are modelled with the \(\pi\)-equivalent circuit:

alternate Text

The elements in the equivalent circuit are calculated from the parameters in the net.line_dc dataframe as:

\begin{align*} R &= r\_ohm\_per\_km \cdot \frac{length\_km}{parallel} \\ G &= g\_us\_per\_km \cdot 10^-6 \cdot length\_km \cdot parallel \\ \end{align*}

The parameters are then transformed in the per unit system:

\begin{align*} R_N &= \frac{V_N^2}{S_N} \\ r &= \frac{R}{R_N} \\ g &= G \cdot R_N \\ \end{align*}

Where the reference voltage \(V_{N}\) is the nominal voltage at the from bus and the rated apparent power \(S_{N}\) is defined system wide in the net object (see Unit Systems and Conventions).

Note

pandapower assumes that nominal voltage of from bus and to bus are equal, which means pandapower does not support lines that connect different voltage levels. If you want to connect different voltage levels, either use a transformer or an impedance element.

Result Table

net.res_line_dc

Parameter

Datatype

Explanation

nullable

required

p_from_mw

float

active power flow into the dc line at “”from”” dc bus [MW]

✓

✓

p_to_mw

float

active power flow into the dc line at “”to”” dc bus [MW]

✓

✓

pl_mw

float

active power losses of the dc line [MW]

✓

✓

i_from_ka

float

Current at from dc bus [kA]

✓

✓

i_to_ka

float

Current at to dc bus [kA]

✓

✓

i_ka

float

Maximum of i_from_ka and i_to_ka [kA]

✓

✓

vm_from_pu

float

voltage magnitude at from dc bus

✓

✓

vm_to_pu

float

voltage magnitude at to dc bus

✓

✓

loading_percent

float

line loading [%]

✓

✓

The power flow results in the net.res_line_dc table are defined as:

\begin{align*} p\_from\_mw &= v_{from} \cdot i_{from} \\ p\_to\_mw &= v_{to} \cdot i_{to} \\ pl\_mw &= p\_from\_mw + p\_to\_mw \\ i\_from\_ka &= i_{from} \\ i\_to\_ka &= i_{to} \\ i\_ka &= max(i_{from}, i_{to}) \\ loading\_percent &= \frac{i\_ka}{imax\_ka \cdot df \cdot parallel} \cdot 100 \end{align*}