Absolute Clipping Stage
- class gem_controllers.stages.clipping_stages.absolute_clipping_stage.AbsoluteClippingStage(control_task='CC')[source]
This class clips a reference absolute to the limit of the corresponding limit of the state
- Parameters
control_task (str) – Control task of the controller stage.
- __call__(state, reference)[source]
Clips a reference to the limits.
- Parameters
state (np.ndarray) – The state of the environment.
reference (np.ndarray) – The reference of the state.
- Returns
The reference of a controller stage clipped to the limit.
- Return type
clipped_reference(np.ndarray)
- property action_range: Tuple[ndarray, ndarray]
Action range of the controller stage
- property clipping_difference: ndarray
Difference between the reference and the clipped reference
- tune(env, env_id, margin=0.0, **kwargs)[source]
Set the limits for the clipped states.
- Parameters
env (gym_electric_motor.ElectricMotorEnvironment) – The environment to be controlled.
env_id (str) – The id of the environment.
margin (float) – Percentage, how far the value should be clipped below the limit.