soft4pes.control.mpc.controllers.im_mpc_curr_ctr#

Model predictive current control for an induction machine.

Classes#

IMMpcCurrCtr

Model predictive current control for an induction machine. The controller aims to track

Module Contents#

class soft4pes.control.mpc.controllers.im_mpc_curr_ctr.IMMpcCurrCtr(solver, lambda_u, Np, disc_method='forward_euler')[source]#

Bases: soft4pes.control.common.controller.Controller

Model predictive current control for an induction machine. The controller aims to track the stator current in the alpha-beta frame. The current reference is calculated based on the torque reference.

Parameters:
  • solver (solver object) – Solver for an MPC algorithm.

  • lambda_u (float) – Weighting factor for the control effort.

  • Np (int) – Prediction horizon.

  • disc_method (str, optional) – Discretization method for the state-space model. Default is ‘forward_euler’.

lambda_u[source]#

Weighting factor for the control effort.

Type:

float

Np[source]#

Prediction horizon steps.

Type:

int

disc_method[source]#

Discretization method for the state-space model.

Type:

str

u_km1_abc[source]#

Previous (step k-1) three-phase switch position or modulating signal.

Type:

1 x 3 ndarray of floats

state_space[source]#

The state-space model of the system.

Type:

SimpleNamespace

solver[source]#

Solver for MPC.

Type:

solver object

C[source]#

Output matrix.

Type:

2 x 4 ndarray of ints

execute(sys, kTs)[source]#

Perform MPC.

Parameters:
  • sys (system object) – System model.

  • kTs (float) – Current discrete time instant [s].

Returns:

Three-phase switch position or modulating signals.

Return type:

1 x 3 ndarray of floats

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 4 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 4 ndarray of floats