Environments

On this page, all environments with their environment-id are listed. In general, all environment-ids are structured as follows:

ControlType-ControlTask-MotorType-v0

  • The ControlType is in {Finite / Cont} for finite control set and continuous control set action spaces

  • The ControlTask is in {TC / SC / CC} (Torque / Speed / Current Control)

  • The MotorType is in {PermExDc / ExtExDc / SeriesDc / ShuntDc / PMSM / SynRM / / EESM / DFIM / SCIM / SIXPMSM }

Environment

environment-id

Permanently Excited DC Motor Environments

Discrete Torque Control Permanently Excited DC Motor Environment

'Finite-TC-PermExDc-v0'

Continuous Torque Control Permanently Excited DC Motor Environment

'Cont-TC-PermExDc-v0'

Discrete Speed Control Permanently Excited DC Motor Environment

'Finite-SC-PermExDc-v0'

Continuous Speed Control Permanently Excited DC Motor Environment

'Cont-SC-PermExDc-v0'

Discrete Current Control Permanently Excited DC Motor Environment

'Finite-CC-PermExDc-v0'

Continuous Current Control Permanently Excited DC Motor Environment

'Cont-CC-PermExDc-v0'

Externally Excited DC Motor Environments

Discrete Torque Control Externally Excited DC Motor Environment

'Finite-TC-ExtExDc-v0'

Continuous Torque Control Externally Excited DC Motor Environment

'Cont-TC-ExtExDc-v0'

Discrete Speed Control Externally Excited DC Motor Environment

'Finite-SC-ExtExDc-v0'

Continuous Speed Control Externally Excited DC Motor Environment

'Cont-SC-ExtExDc-v0'

Discrete Current Control Externally Excited DC Motor Environment

'Finite-CC-ExtExDc-v0'

Continuous Current Control Externally Excited DC Motor Environment

'Cont-CC-ExtExDc-v0'

Series DC Motor Environments

Discrete Torque Control Series DC Motor Environment

'Finite-TC-SeriesDc-v0'

Continuous Torque Control Series DC Motor Environment

'Cont-TC-SeriesDc-v0'

Discrete Speed Control Series DC Motor Environment

'Finite-SC-SeriesDc-v0'

Continuous Speed Control Series DC Motor Environment

'Cont-SC-SeriesDc-v0'

Discrete Current Control Series DC Motor Environment

'Finite-CC-SeriesDc-v0'

Continuous Current Control Series DC Motor Environment

'Cont-CC-SeriesDc-v0'

Shunt DC Motor Environments

Discrete Torque Control Shunt DC Motor Environment

'Finite-TC-ShuntDc-v0'

Continuous Torque Control Shunt DC Motor Environment

'Cont-TC-ShuntDc-v0'

Discrete Speed Control Shunt DC Motor Environment

'Finite-SC-ShuntDc-v0'

Continuous Speed Control Shunt DC Motor Environment

'Cont-SC-ShuntDc-v0'

Discrete Current Control Shunt DC Motor Environment

'Finite-CC-ShuntDc-v0'

Continuous Current Control Shunt DC Motor Environment

'Cont-CC-ShuntDc-v0'

Permanent Magnet Synchronous Motor (PMSM) Environments

Finite Torque Control PMSM Environment

'Continuous Finite-TC-PMSM-v0'

Torque Control PMSM Environment

'Cont-TC-PMSM-v0'

Finite Speed Control PMSM Environment

'Continuous Finite-SC-PMSM-v0'

Speed Control PMSM Environment

'Cont-SC-PMSM-v0'

Finite Current Control PMSM Environment

'Continuous Finite-CC-PMSM-v0'

Current Control PMSM Environment

'Cont-CC-PMSM-v0'

Externally Excited Synchronous Motor (EESM) Environments

Finite Torque Control EESM Environment

'Continuous Finite-TC-EESM-v0'

Torque Control EESM Environment

'Cont-TC-EESM-v0'

Finite Speed Control EESM Environment

'Continuous Finite-SC-EESM-v0'

Speed Control EESM Environment

'Cont-SC-EESM-v0'

Finite Current Control EESM Environment

'Continuous Finite-CC-EESM-v0'

Current Control EESM Environment

'Cont-CC-EESM-v0'

Synchronous Reluctance Motor (SynRM) Environments

Finite Torque Control SynRM Environment

'Continuous Finite-TC-SynRM-v0'

Torque Control SynRM Environment

'Cont-TC-SynRM-v0'

Finite Speed Control SynRM Environment

'Continuous Finite-SC-SynRM-v0'

Speed Control SynRM Environment

'Cont-SC-SynRM-v0'

Finite Current Control SynRM Environment

'Continuous Finite-CC-SynRM-v0'

Current Control SynRM Environment

'Cont-CC-SynRM-v0'

Squirrel Cage Induction Motor (SCIM) Environments

Finite Torque Control SCIM Environment

'Continuous Finite-TC-SCIM-v0'

Torque Control SCIM Environment

'Cont-TC-SCIM-v0'

Finite Speed Control SCIM Environment

'Continuous Finite-SC-SCIM-v0'

Speed Control SCIM Environment

'Cont-SC-SCIM-v0'

Finite Current Control SCIM Environment

'Continuous Finite-CC-SCIM-v0'

Current Control SCIM Environment

'Cont-CC-SCIM-v0'

Doubly Fed Induction Motor (DFIM) Environments

Finite Torque Control DFIM Environment

'Continuous Finite-TC-DFIM-v0'

Torque Control DFIM Environment

'Cont-TC-DFIM-v0'

Finite Speed Control DFIM Environment

'Continuous Finite-SC-DFIM-v0'

Speed Control DFIM Environment

'Cont-SC-DFIM-v0'

Finite Current Control DFIM Environment

'Continuous Finite-CC-DFIM-v0'

Current Control DFIM Environment

'Cont-CC-DFIM-v0'

Six Phase PMSM (SIXPMSM) Environments

Finite Torque Control SIXPMSM Environment

'Continuous Finite-TC-SIXPMSM-v0'

Torque Control SIXPMSM Environment

'Cont-TC-SIXPMSM-v0'

Finite Speed Control SIXPMSM Environment

'Continuous Finite-SC-SIXPMSM-v0'

Speed Control SIXPMSM Environment

'Cont-SC-SIXPMSM-v0'

Finite Current Control SIXPMSM Environment

'Continuous Finite-CC-SIXPMSM-v0'

Current Control SIXPMSM Environment

'Cont-CC-SIXPMSM-v0'

Motor Environments:

Electric Motor Base Environment

class gym_electric_motor.core.ElectricMotorEnvironment(physical_system, reference_generator, reward_function, visualization=(), state_filter=None, callbacks=(), constraints=(), physical_system_wrappers=(), scale_plots=False, **kwargs)[source]

Bases: Env

API for gym_electric_motor.core.ElectricMotorEnvironment.

Note

The original docstring is temporarily suppressed due to formatting issues upstream. Once it’s cleaned, we’ll restore the full text here.

API for gym_electric_motor.core.ElectricMotorEnvironment.

Note

The original docstring is temporarily suppressed due to formatting issues upstream. Once it’s cleaned, we’ll restore the full text here.

close()[source]

Called when the environment is deleted. Closes all its modules.

get_wrapper_attr(name: str) Any

Gets the attribute name from the environment.

has_wrapper_attr(name: str) bool

Checks if the attribute name exists in the environment.

make(*args, **kwargs)[source]
render(*_, **__)[source]

Update the visualization of the motor.

reset(seed=None, options=None, *_, **__)[source]

Reset of the environment and all its modules to an initial state.

Returns:

The initial observation consisting of the initial state and initial reference. info(dict): Auxiliary information (optional)

set_wrapper_attr(name: str, value: Any, *, force: bool = True) bool

Sets the attribute name on the environment with value, see Wrapper.set_wrapper_attr for more info.

step(action)[source]

Perform one simulation step of the environment with an action of the action space.

Parameters:

action – Action to play on the environment.

Returns:

Tuple of the new state and the next reference. reward(float): Amount of reward received for the last step. terminated(bool): Flag, indicating if a reset is required before new steps can be taken. info(dict): Auxiliary information (optional)

Return type:

observation(Tuple(ndarray(float),ndarray(float))

action_space: spaces.Space[ActType]
property constraint_monitor

The ConstraintMonitor of the environment.

Type:

Returns(ConstraintMonitor)

current_next_reference = None
current_reference = None
current_state = None
env_id = None
property limits

Returns a list of limits of all states in the observation (called in state_filter) in the same order

metadata: dict[str, Any] = {'render_modes': []}
property nominal_state

Returns a list of nominal values of all states in the observation (called in state_filter) in that order

property np_random: Generator

Returns the environment’s internal _np_random that if not set will initialise with a random seed.

Returns:

Instances of np.random.Generator

property np_random_seed: int

Returns the environment’s internal _np_random_seed that if not set will first initialise with a random int as seed.

If np_random_seed was set directly instead of through reset() or set_np_random_through_seed(), the seed will take the value -1.

Returns:

the seed of the current np_random or -1, if the seed of the rng is unknown

Return type:

int

observation_space: spaces.Space[ObsType]
property physical_system

Returns: PhysicalSystem: The Physical System of the Environment

property reference_generator

Returns: ReferenceGenerator: The ReferenceGenerator of the Environment

property reference_names

Returns a list of state names of all states in the observation (called in state_filter) in the same order

render_mode: str | None = None
property reward_function

Returns: RewardFunction: The RewardFunction of the environment

sim = SimulationEnvironment(tau=0.0, step=0)
spec: EnvSpec | None = None
property state_names

Returns a list of state names of all states in the observation (called in state_filter) in the same order

property unwrapped: Env[ObsType, ActType]

Returns the base non-wrapped environment.

Returns:

The base non-wrapped gymnasium.Env instance

Return type:

Env

property visualizations

Returns a list of all active motor visualizations.

workspace = Workspace()
../../_images/TopLevelStructure.svg