soft4pes.control.mpc.solvers.mpc_enum#
Enumeration based solver for model predictive control (MPC).
Classes#
Enumeration-based solver for model predictive control (MPC). |
Module Contents#
- class soft4pes.control.mpc.solvers.mpc_enum.MpcEnum(conv)[source]#
Enumeration-based solver for model predictive control (MPC).
- Parameters:
conv (converter object) – Converter model.
- U_seq[source]#
Array for sequences of three-phase switch positions (switching sequences).
- Type:
3*Np x conv.nl^(3*Np) ndarray of ints
- sw_pos_3ph#
Possible one-phase switch positions.
- Type:
1 x conv.nl ndarray of ints
- __call__(sys, ctr, y_ref)[source]#
Solve MPC problem with exhaustive enumeration.
- Parameters:
sys (system object) – System model.
ctr (controller object) – Controller object.
y_ref (ndarray of floats) – Reference vector [p.u.].
- Returns:
u_abc – The three-phase switch position with the lowest cost.
- Return type:
1 x 3 ndarray of ints
- solve(sys, ctr, xk, y_ref, u_km1_abc)[source]#
Recursively compute the cost for different switching sequences
- Parameters:
sys (system object) – System model.
ctr (controller object.) – Controller object.
xk (ndarray of floats) – Current state vector [p.u.].
y_ref (ndarray of floats) – Reference vector [p.u.].
u_km1_abc (1 x 3 ndarray of ints) – Three-phase switch position applied at step k-1.
- Returns:
J – Cost array.
- Return type:
1 x nl^(3*Np) ndarray of floats