Skip to content

Latest commit

 

History

History
 
 

examples

Examples

In order to provide better accessibility of this simulation library we created several examples that showcase the usage of GEM's interface and features. The presented examples can be classified either as classical control examples (where conventional control methods are applied), as reinforcement-learning control examples (which present a rather novel branch of control theory), or as feature showcases (where the focus lies in introducing interesting and useful builtins).

Installation, Setup and Interface

  • GEM_cookbook.ipynb: a basic tutorial-style notebook that presents the basic interface and usage of GEM

Classical Control

  • pi_series_omega_control.py: a conventional linear control algorithm applied to the speed control of a series DC motor with continuous-control-set
  • perm_dc_omega_control.py: a conventional discontinuous control algorithm applied to the speed control of a permanently excited DC motor with finite-control-set

Advanced Control

  • gekko_mpc_cont_pmsm_example.ipynb: a model predictive control solution for the currents of the three-phase permanent magnet synchronous motor on a continuous-control-set

Reinforcement-Learning Control

  • dqn_series_current_control.py: a deep Q-value network reinforcement-learning control approach for finite-control-set current control of a series DC motor
  • ddpg_pmsm_dq_current_control.py: a deep deterministic policy gradient reinforcement-learning control approach applied to the current control of a permanent magnet synchronous motor within the $dq$-frame with continuous-control-set
  • ddpg_series_omega_control.py: a deep deterministic policy gradient reinforcement-learning control approach applied to the speed control of a series DC motor with continuous-control-set
  • keras_rl2_dqn_disc_pmsm_example.ipynb: a tutorial-style notebook that presents the usage of GEM in conjunction with Keras_RL2 in the context of deep Q learning current control of a permanent magnet synchronous motor
  • stable_baselines3_dqn_disc_pmsm_example.ipynb: a tutorial-style notebook that presents the usage of GEM in conjunction with Stable Baselines3 in the context of deep Q learning current control of a permanent magnet synchronous motor
  • tensorforce_dqn_disc_pmsm_example.ipynb: a tutorial-style notebook that presents the usage of GEM in conjunction with Tensorforce in the context of deep Q learning current control of a permanent magnet synchronous motor

Feature Showcases

  • external_speed_profile.py: presents a builtin feature that can be used to define arbitrary speed profiles, which is useful when e.g. investigating generator operation (where mechanical and thus electrical frequency is determined by external means)
  • userdefined_initialization.py: presents a builtin feature that allows the user to determine the initial state of the motor, which comes in handy when e.g. using exploring starts in reinforcement learning applications
  • userdefined_constraints.py: presents a builtin feature that can be used to extend the operational constraints of the motor, because oftentimes emergency shutdowns should be performed on the basis of composite conditions (e.g. for three-phase drives it is important to monitor instead of monitoring and independently)
  • scim_ideal_grid_simulation.py: simulates the start-up behavior of the squirrel cage induction motor connected to an ideal three-phase grid. The state and action space is continuous. Running the example will create a formatted plot that show the motors angular velocity, the drive torque, the applied voltage in three-phase abc-coordinates and the measured current in field-oriented dq-coordinates.