soft4pes.control.lin.grid_curr_ref_gen#

Grid current reference generator.

Classes#

GridCurrRefGen

Grid current reference generator. This class generates the grid current reference based on the

Module Contents#

class soft4pes.control.lin.grid_curr_ref_gen.GridCurrRefGen[source]#

Bases: soft4pes.control.common.Controller

Grid current reference generator. This class generates the grid current reference based on the active and reactive power references using grid voltage. The equations are in per unit. Grid voltage orientation is assumed, i.e. vg_d is aligned with d-axis of the dq-reference frame. Moreover, the positive grid current flows from the converter to the grid.

execute(sys, kTs)[source]#

Generate the current reference.

Parameters:
  • sys (object) – System model.

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

Returns:

output – The output of the controller, containing the current reference in dq frame.

Return type:

SimpleNamespace