PI Controller
- class gem_controllers.stages.base_controllers.pi_controller.PIController(control_task)[source]
This class combines the proportional controller and the integration controller to a PI controller
- Parameters
control_task (str) – Control task of the PI controller
- _tune_current_controller(env, env_id, a=4)[source]
Tune the P controller and I controller for the current control by the symmetrical optimum.
- 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_flux_controller(env, env_id, a=4, t_n=None)[source]
Tune the P controller and I controller for the flux control by the symmetrical optimum.
- 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.
- _tune_speed_controller(env, env_id, a=4, t_n=None)[source]
Tune the P controller and I controller for the speed control by the symmetrical optimum.
- 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 reference of the underlying stage by adding the P- and I-component.
- Parameters
state (np.ndarray) – The state of the environment.
reference (np.ndarray) – The reference of the state.
- Returns
output of the controller stage
- Return type
controller_output(np.ndarray)
- tune(env, env_id, a=4, t_n=None)[source]
Tune the components of the controller for the desired task.
- 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 controller stage.