soft4pes.control.mpc.controllers.lcl_vc_mpc_ctr#
Model predictive control (MPC) for the control of the capacitor voltage.
Classes#
Model predictive control (MPC) for the control of the capacitor voltage. |
Module Contents#
- class soft4pes.control.mpc.controllers.lcl_vc_mpc_ctr.LCLVcMpcCtr(solver, lambda_u, Np, I_conv_max=1.2, xi_I_conv=1000000.0, disc_method='exact_discretization')[source]#
Bases:
soft4pes.control.common.controller.Controller
Model predictive control (MPC) for the control of the capacitor voltage.
- Parameters:
solver (solver object) – Solver for an MPC algorithm.
lambda_u (float) – Weighting factor for the control effort.
Np (int) – Prediction horizon steps.
disc_method (str, optional) – Discretization method for the state-space model. Default is ‘exact_discretization’.
I_conv_max (float) – Maximum converter current [p.u.].
xi_I_conv (float) – Slack variable weight for the current constraint.
- u_km1_abc[source]#
Previous (step k-1) three-phase switch position or modulating signal.
- Type:
1 x 3 ndarray of floats
- execute(sys, kTs)[source]#
Perform MPC and save the controller data.
- Parameters:
sys (system object) – System model.
kTs (float) – Current discrete time instant [s].
- Returns:
SimpleNameSpace containing the converter three-phase switch position or modulating signal.
- Return type:
SimpleNamespace
- get_next_state(sys, xk, u_abc, k)[source]#
Get the next state of the system.
- Parameters:
sys (system object) – The system model.
xk (1 x 6 ndarray of floats) – The current state of the system.
u_abc (1 x 3 ndarray of floats) – Converter three-phase switch position or modulating signal.
k (int) – The solver prediction step.
- Returns:
The next state of the system.
- Return type:
1 x 6 ndarray of floats