soft4pes.control.common.utils#
Utility functions and classes for the control module.
Classes#
General first-order filter. |
Functions#
|
Wrap the angle theta to the range [-pi, pi]. |
|
Convert a voltage reference to a modulating signal. |
|
Limit the input in to maximum magnitude. The input can be in alpha-beta or dq-frame, and given |
Module Contents#
- soft4pes.control.common.utils.wrap_theta(theta)[source]#
Wrap the angle theta to the range [-pi, pi].
- Parameters:
theta (float) – The angle in radians.
- Returns:
The wrapped angle in radians.
- Return type:
float
- soft4pes.control.common.utils.get_modulating_signal(v_ref, v_dc)[source]#
Convert a voltage reference to a modulating signal.
- Parameters:
v_ref (ndarray) – The reference voltage in alpha-beta frame.
v_dc (float) – The dc-link voltage.
- Returns:
The modulating signal in abc-frame.
- Return type:
ndarray
- soft4pes.control.common.utils.magnitude_limiter(input_signal, limit)[source]#
Limit the input in to maximum magnitude. The input can be in alpha-beta or dq-frame, and given as a vector or complex number.
- Parameters:
limit (float) – Maximum magnitude [p.u.].
input_signal (1 x 2 ndarray of floats or complex) – Unlimited input [p.u.].
- Returns:
Limited output [p.u.].
- Return type:
1 x 2 ndarray of floats