soft4pes.control.mpc.solvers.mpc_QP#
This module contains the class MpcQP, which is used to solve the MPC problem using a quadratic program (QP) solver.
The formulation of the control problem and the QP matrices are based on “M. Rossi, P. Karamanakos, and F. Castelli-Dezza, “An indirect model predictive control method for grid-connected three-level neutral point clamped converters with LCL filters,” IEEE Trans. Ind. Applicat., vol. 58, no. 3, pp. 3750-3768, May/Jun. 2022”. Note, that contrary to the reference, the grid voltage is modelled as a disturbance. Moreover, the same states do not have to be both controlled (i.e., be output variables) and constrained.
The QP is solved using the qpsolvers package and the solver ‘DAQP’, licensed under the MIT license.
Classes#
Problem formulation and QP solver for indirect MPC. |
Module Contents#
- class soft4pes.control.mpc.solvers.mpc_QP.IndirectMpcQP[source]#
Problem formulation and QP solver for indirect MPC.
- QP_matrices[source]#
Namespace containing the matrices used in the QP problem.
- Type:
SimpleNamespace
- __call__(sys, ctr, y_ref)[source]#
Formulate and solve the MPC QP.
- 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 modulating signal.
- Return type:
1 x 3 ndarray of floats