Combined Clipping Stage
- class gem_controllers.stages.clipping_stages.combined_clipping_stage.CombinedClippingStage(control_task='CC')[source]
This clipping stage combines the absolute clipping and the squared clipping.
- __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 clipping_difference: ndarray
Difference between the reference and the clipped reference
- tune(env, env_id, margin=0.0, squared_clipped_state=array([0, 1]), absoulte_clipped_states=array([2]))[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.
squared_clipped_state (np.ndarray) – Indices of the squared clipped states.
absoulte_clipped_states (np.ndarray) – Indices of the absolute clipped states.