Controls#

There are four available types of control.

Constant control#

No control is applied, this is equivalent to a classical power load. The constant control can be built like this:

from roseau.load_flow import Control

# Use the constructor. Note that the voltages are not important in this case.
control = Control(type="constant", u_min=0.0, u_down=0.0, u_up=0.0, u_max=0.0)

# Or prefer using the shortcut
control = Control.constant()

\(P(U)\) control#

Control the maximum active power of a load (often a PV inverter) based on the voltage \(P^{\max}(U)\).

The \(P(U)\) control accepts two approximation parameters: alpha and epsilon.

  • alpha is used to compute soft clipping functions. The higher alpha is, the better the approximations are.

  • epsilon is used to approximate a smooth inverse function:

    \[\forall x \geq 0, \frac{1}{x} \approx \frac{1}{\varepsilon \times \exp\left(\frac{-x}{\varepsilon}\right) + {x}}\]

    The lower epsilon is, the better the approximations are.

Note

The functions \(s_{\alpha}\) used for the \(P(U)\) controls are derived from the soft clipping function of [KP20].

Production#

With this control, the following soft clipping family of functions \(s_{\alpha}(U)\) is used. The default value of alpha is 1000.

P(U) production control

The final \(P\) is then \(P(U) = \max(s_{\alpha}(U) \times S^{\max}, P^{\mathrm{th.}})\). Note that this final \(\underline{S(U)}\) point may lie outside the disc of radius \(S^{\max}\) in the \((P, Q)\) plane. See the Projection page for more details about this case.

from roseau.load_flow import Control, Q_

# Use the constructor. Note that u_min and u_down are useless with the production control
production_control = Control(
    type="p_max_u_production", u_min=0, u_down=0, u_up=Q_(240, "V"), u_max=Q_(250, "V")
)

# Or prefer the shortcut
production_control = Control.p_max_u_production(u_up=Q_(240, "V"), u_max=Q_(250, "V"))

Consumption#

With this control, the following soft clipping family of functions \(s_{\alpha}(U)\) is used. The default value of alpha is 1000.

P(U) consumption control

The final \(P\) is then \(P(U) = \min(s_{\alpha}(U) \times S^{\max}, P^{\mathrm{th.}})\). Note that this final \(\underline{S(U)}\) point may lie outside the disc of radius \(S^{\max}\) in the \((P, Q)\) plane. See the Projection page for more details about this case.

from roseau.load_flow import Control, Q_

# Use the constructor. Note that u_max and u_up are useless with the consumption control
consumption_control = Control(
    type="p_max_u_consumption", u_min=Q_(210, "V"), u_down=Q_(220, "V"), u_up=0, u_max=0
)

# Or prefer the shortcut
consumption_control = Control.p_max_u_consumption(u_min=Q_(210, "V"), u_down=Q_(220, "V"))

\(Q(U)\) control#

Control the reactive power based on the voltage \(Q(U)\). With this control, the following soft clipping family of functions \(s_{\alpha}(U)\) is used. The default value of alpha is 1000.

Q(U) control

The final \(Q\) is then \(Q(U) = s_{\alpha}(U) \times S^{\max}\). Note that this final \(\underline{S(U)}\) point may lie outside the disc of radius \(S^{\max}\) in the \((P, Q)\) plane. See the Projection page for more details about this case.

Note

The function \(s_{\alpha}\) used for the \(Q(U)\) control is derived from the soft clipping function of [KP20].

from roseau.load_flow import Control, Q_

# Use the constructor. Note that all the voltages are important.
control = Control(
    type="q_u",
    u_min=Q_(210, "V"),
    u_down=Q_(220, "V"),
    u_up=Q_(240, "V"),
    u_max=Q_(250, "V"),
)

# Or prefer the shortcut
control = Control.q_u(
    u_min=Q_(210, "V"), u_down=Q_(220, "V"), u_up=Q_(240, "V"), u_max=Q_(250, "V")
)

Bibliography#

[KP20] (1,2)

Matthew Klimek and Maxim Perelstein. Neural network-based approach to phase space integration. SciPost Physics, oct 2020. URL: https://doi.org/10.21468%2Fscipostphys.9.4.053, doi:10.21468/scipostphys.9.4.053.