gym-electric-motor (GEM)

gym-electric-motor (GEM): A Python toolbox for the simulation of electric drive systems - Published in JOSS (2021)

https://github.com/upb-lea/gym-electric-motor

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 14 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, ieee.org, joss.theoj.org, zenodo.org
  • Committers with academic emails
    4 of 21 committers (19.0%) from academic institutions
  • Institutional organization owner
    Organization upb-lea has institutional domain (ei.uni-paderborn.de)
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

benchmark converters electric-drive electrical-engineering gym-environment machinelearning motor-models openai openai-gym openai-gym-environments pmsm reinforcement-learning

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 6 months ago · JSON representation

Repository

Gym Electric Motor (GEM): An OpenAI Gym Environment for Electric Motors

Basic Info
Statistics
  • Stars: 364
  • Watchers: 22
  • Forks: 73
  • Open Issues: 34
  • Releases: 10
Topics
benchmark converters electric-drive electrical-engineering gym-environment machinelearning motor-models openai openai-gym openai-gym-environments pmsm reinforcement-learning
Created over 6 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Gym Electric Motor

Overview paper | Reinforcement learning paper | GEM control paper | Quickstart | Install guide | Reference docs | Release notes

Build Status codecov PyPI version shields.io License DOI Zenodo DOI JOSS

Overview

The gym-electric-motor (GEM) package is a Python toolbox for the simulation and control of various electric motors. It is built upon Faram Gymnasium Environments, and, therefore, can be used for both, classical control simulation and reinforcement learning experiments. It allows you to construct a typical drive train with the usual building blocks, i.e., supply voltages, converters, electric motors and load models, and obtain not only a closed-loop simulation of this physical structure, but also a rich interface for plugging in any decision making algorithm, from linear feedback control to Deep Deterministic Policy Gradient agents. In addition, an automated framework for classical control structures based on PI controllers is provided.

Getting Started

An easy way to get started with GEM is by playing around with the following interactive notebooks in Google Colaboratory. Most important features of GEM as well as application demonstrations are showcased, and give a kickstart for engineers in industry and academia.

There is a list of standalone example scripts as well for minimalistic demonstrations.

A basic routine is as simple as: ```py import gymelectricmotor as gem

if name == 'main': env = gem.make("Finite-CC-PMSM-v0") # instantiate a discretely controlled PMSM env.reset() for _ in range(10000): (states, references), rewards, done, _ =\ env.step(env.action_space.sample()) # pick random control actions if done: (states, references), _ = env.reset() env.close() ```

Installation

  • Install gym-electric-motor from PyPI (recommended):

pip install gym-electric-motor

  • Install from Github source:

``` git clone git@github.com:upb-lea/gym-electric-motor.git cd gym-electric-motor

Then either

python setup.py install

or alternatively

pip install -e . ```

Building Blocks

A GEM environment consists of following building blocks: - Physical structure: - Voltage supply - Converter - Electric motor - Load model - Utility functions for reference generation, reward calculation and visualization

Information Flow in a GEM Environment

Among various DC-motor models, the following AC motors - together with their power electronic counterparts - are available: - Permanent magnet synchronous motor (PMSM) - Synchronous reluctance motor (SynRM) - Externally exited synchronous motor (EESM) - Squirrel cage induction motor (SCIM) - Doubly-fed induction motor (DFIM)

The converters can be driven by means of a duty cycle (continuous control set) or switching commands (finite control set).

Citation

A white paper for the general toolbox in the context of drive simulation and control prototyping can be found in the Journal of Open Sorce Software (JOSS). Please use the following BibTeX entry for citing it: ``` @article{Balakrishna2021, doi = {10.21105/joss.02498}, url = {https://doi.org/10.21105/joss.02498}, year = {2021}, publisher = {The Open Journal}, volume = {6}, number = {58}, pages = {2498}, author = {Praneeth {Balakrishna} and Gerrit {Book} and Wilhelm {Kirchgässner} and Maximilian {Schenke} and Arne {Traue} and Oliver {Wallscheid}}, title = {gym-electric-motor (GEM): A Python toolbox for the simulation of electric drive systems}, journal = {Journal of Open Source Software} }

```

A white paper for the utilization of this framework within reinforcement learning is available at IEEE-Xplore (preprint: arxiv.org/abs/1910.09434). Please use the following BibTeX entry for citing it: @article{9241851, author={Traue, Arne and Book, Gerrit and Kirchgässner, Wilhelm and Wallscheid, Oliver}, journal={IEEE Transactions on Neural Networks and Learning Systems}, title={Toward a Reinforcement Learning Environment Toolbox for Intelligent Electric Motor Control}, year={2022}, volume={33}, number={3}, pages={919-928}, doi={10.1109/TNNLS.2020.3029573}}

A white paper for the classical control approaches of gym-electric-motor control is available at IEEE-Xplore. Please use the following BibTeX entry for citing it: @INPROCEEDINGS{10239044, author={Book, Felix and Traue, Arne and Schenke, Maximilian and Haucke-Korber, Barnabas and Wallscheid, Oliver}, booktitle={2023 IEEE International Electric Machines & Drives Conference (IEMDC)}, title={Gym-Electric-Motor (GEM) Control: An Automated Open-Source Controller Design Suite for Drives}, year={2023}, volume={}, number={}, pages={1-7}, doi={10.1109/IEMDC55163.2023.10239044}}

Running Unit Tests with Pytest

To run the unit tests ''pytest'' is required. All tests can be found in the ''tests'' folder. Execute pytest in the project's root folder: ```

pytest or with test coverage: pytest --cov=./ ``` All tests shall pass.

Owner

  • Name: Paderborn University - LEA
  • Login: upb-lea
  • Kind: organization
  • Location: Paderborn, Germany

Department of power electronics and electrical drives

JOSS Publication

gym-electric-motor (GEM): A Python toolbox for the simulation of electric drive systems
Published
February 07, 2021
Volume 6, Issue 58, Page 2498
Authors
Praneeth Balakrishna
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Gerrit Book
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Wilhelm Kirchgässner ORCID
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Maximilian Schenke ORCID
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Arne Traue
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Oliver Wallscheid ORCID
Department of Power Electronics and Electrical Drives, Paderborn University, Germany
Editor
Kevin M. Moerman ORCID
Tags
electric drive control electric motors OpenAI Gym power electronics reinforcement learning

GitHub Events

Total
  • Create event: 15
  • Release event: 1
  • Issues event: 21
  • Watch event: 60
  • Delete event: 6
  • Member event: 3
  • Issue comment event: 11
  • Push event: 121
  • Pull request review comment event: 20
  • Pull request review event: 23
  • Pull request event: 26
  • Fork event: 13
Last Year
  • Create event: 15
  • Release event: 1
  • Issues event: 21
  • Watch event: 60
  • Delete event: 6
  • Member event: 3
  • Issue comment event: 11
  • Push event: 125
  • Pull request review comment event: 20
  • Pull request review event: 23
  • Pull request event: 26
  • Fork event: 13

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 890
  • Total Committers: 21
  • Avg Commits per committer: 42.381
  • Development Distribution Score (DDS): 0.707
Past Year
  • Commits: 76
  • Committers: 6
  • Avg Commits per committer: 12.667
  • Development Distribution Score (DDS): 0.553
Top Committers
Name Email Commits
Arne a****e@g****e 261
wkirgsn w****r@g****e 109
Felix Book 6****8 96
Maximilian Schenke m****e@m****e 75
GitPascalP p****6@g****m 74
Darius d****t@w****e 65
Stefan Arndt s****t@m****e 38
S.A 8****t 34
wallscheid 5****d 34
RohithCharanD r****0@o****m 28
Praneeth Balakrishna b****h@g****m 24
KoehlerM173 k****s@o****e 22
HauckeBa b****r@i****g 15
Maximilian Schenke m****e 6
Marvin Meyer 2****r 2
Stefan Heid s****d@w****e 2
Deployment Bot (from Travis CI) d****y@t****g 1
Joni Airaksinen a****o@g****m 1
Pramod_Mahajan p****m@m****e 1
Gerrit Book g****k@m****e 1
unknown r****5@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 144
  • Total pull requests: 150
  • Average time to close issues: 3 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 32
  • Total pull request authors: 21
  • Average comments per issue: 2.27
  • Average comments per pull request: 0.96
  • Merged pull requests: 107
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 16
  • Pull requests: 28
  • Average time to close issues: 3 months
  • Average time to close pull requests: 11 days
  • Issue authors: 4
  • Pull request authors: 6
  • Average comments per issue: 0.19
  • Average comments per pull request: 0.11
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • wallscheid (21)
  • wkirgsn (18)
  • atra94 (17)
  • XyDrKRulof (16)
  • bhk11 (16)
  • max-schenke (13)
  • GitPascalP (10)
  • stheid (3)
  • vapemaster-kz (2)
  • jmailloux (2)
  • soumava11 (2)
  • Priyadharshan2001 (2)
  • fbook98 (2)
  • KoehlerM173 (2)
  • jose-otero-rodriguez (1)
Pull Request Authors
  • atra94 (42)
  • max-schenke (19)
  • XyDrKRulof (16)
  • fbook98 (13)
  • bhk11 (9)
  • devandt (9)
  • wkirgsn (8)
  • ranil345 (6)
  • annava1 (6)
  • manjeetjha070 (4)
  • RohithCharanD (3)
  • praneeth-b (2)
  • MarvinMeyer (2)
  • stheid (2)
  • wallscheid (2)
Top Labels
Issue Labels
enhancement (27) bug (13) documentation (3) agenda/meeting (3)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 177 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 15
  • Total maintainers: 2
pypi.org: gym-electric-motor

A Farama Gymnasium environment for electric motor control.

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 177 Last month
Rankings
Stargazers count: 4.2%
Forks count: 5.5%
Dependent packages count: 7.3%
Average: 12.2%
Downloads: 21.7%
Dependent repos count: 22.1%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/build_and_test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • ad-m/github-push-action master composite
  • ammaraskar/sphinx-action master composite
.github/workflows/pypi-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
requirements.txt pypi
  • gym <0.24.0,>=0.15.4
  • matplotlib >=3.1.2
  • numpy >=1.16.4
  • pytest >=5.2.2
  • pytest-cov *
  • scipy >=1.4.1
setup.py pypi