Base Controllers

Base Controller

class gem_controllers.stages.base_controllers.base_controller.BaseController(control_task)[source]

The base controller is the base class for all dynamic control stages like the P-I-D controllers or the Three-Point controller.

In contrast to other stages, the base controllers can be used for multiple tasks e.g. a speed control with a reference as output or a current control with voltages as output.

Parameters

control_task (str) – Control task of the base controller.

__call__(state, reference)[source]

Calculate the reference value of the base controller.

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

  • reference (np.ndarray) – The reference of the state.

Returns

reference values of the next stage

Return type

np.array

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

Tune a base controller.

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.

  • **base_controller_kwargs – Keyword arguments, that should be passed to a base controller