PID Controller

class gem_controllers.stages.base_controllers.pid_controller.PIDController(control_task)[source]

This class extends the PI controller by differential controller.

Parameters

control_task (str) – Control task of the PID controller

_tune_current_controller(env, env_id, a=4)[source]

Set the gains of the P-, I- and D-component for the current control.

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.

  • a (float) – Design parameter of the symmetrical optimum.

_tune_speed_controller(env, env_id, a=4, t_n=None)[source]

Set the gains of the P-, I- and D-component for the speed control.

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.

  • a (float) – Design parameter of the symmetrical optimum.

  • t_n (float) – Time constant of the underlying torque controller.

control(state, reference)[source]

Calculate the action of the PID controller.

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

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

Returns

The action of the PID controller

Return type

action(np.ndarray)

property d_gain

D gain of the D base controller