Discrete Output Stage

class gem_controllers.stages.disc_output_stage.DiscOutputStage[source]

This class maps the discrete input voltages, calculated by the controller, to the scalar inputs of the used converter.

__call__(state, reference)[source]

Maps the input voltages to the scalar inputs of the converter.

Parameters
  • state (np.ndarray) – The state of the environment.

  • reference (np.ndarray) – The reference voltages.

Returns

scalar action of the environment

Return type

action(int)

property output_stage

Output stage of the controller

to_action(_state, reference)[source]

Map the voltages to a voltage level.

Parameters
  • _state (np.ndarray) – The state of the environment.

  • reference (np.ndarray) – The reference voltages.

Returns

volatge vector

Return type

action(np.ndarray)

static to_b6_discrete(multi_discrete_action)[source]

Returns the multi discrete action for a B6 brigde converter.

static to_discrete(multi_discrete_action)[source]

Transform multi discrete action to a discrete action.

Parameters

multi_discrete_action (np.array) – Array of multi discrete actions

Returns

discrete action

Return type

int

static to_multi_discrete(multi_discrete_action)[source]

Returns the multi discrete action.

tune(env, env_id, **__)[source]

Set the values for the low, idle and high action.

Parameters
  • env (ElectricMotorEnvironment) – The GEM-Environment that the controller shall be created for.

  • env_id (str) – The corresponding environment-id to specify the concrete environment.