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:
import roseau.load_flow as rlf
# Use the constructor. Note that the voltages are not important in this case.
control = rlf.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 = rlf.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 higheralpha
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.
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.
import roseau.load_flow as rlf
# Use the constructor. Note that u_min and u_down are useless with the production control
production_control = rlf.Control(
type="p_max_u_production",
u_min=0,
u_down=0,
u_up=rlf.Q_(240, "V"),
u_max=rlf.Q_(250, "V"),
)
# Or prefer the shortcut
production_control = rlf.Control.p_max_u_production(
u_up=rlf.Q_(240, "V"), u_max=rlf.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.
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.
import roseau.load_flow as rlf
# Use the constructor. Note that u_max and u_up are useless with the consumption control
consumption_control = rlf.Control(
type="p_max_u_consumption",
u_min=rlf.Q_(210, "V"),
u_down=rlf.Q_(220, "V"),
u_up=0,
u_max=0,
)
# Or prefer the shortcut
consumption_control = rlf.Control.p_max_u_consumption(
u_min=rlf.Q_(210, "V"), u_down=rlf.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.
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].
import roseau.load_flow as rlf
# Use the constructor. Note that all the voltages are important.
control = rlf.Control(
type="q_u",
u_min=rlf.Q_(210, "V"),
u_down=rlf.Q_(220, "V"),
u_up=rlf.Q_(240, "V"),
u_max=rlf.Q_(250, "V"),
)
# Or prefer the shortcut
control = rlf.Control.q_u(
u_min=rlf.Q_(210, "V"),
u_down=rlf.Q_(220, "V"),
u_up=rlf.Q_(240, "V"),
u_max=rlf.Q_(250, "V"),
)
Bibliography¶
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.