gym-electric-motor
gym-electric-motor copied to clipboard
Hi, We are using the GEM library for testing the functionality of PMSM as a part of our undergraduate project.
We do not plan to use either motor control or the RL part of the library , however we would like to use it only for PMSM testing.
For the same purpose, we would like to make changes to the circuit implementation of PMSM. We are referring to the documentation from this site: https://upb-lea.github.io/gym-electric-motor/parts/physical_systems/electric_motors.html#gym_electric_motor.physical_systems.electric_motors.PermanentMagnetSynchronousMotor and also the documents referred to in it.
As our understanding of the PY code goes, the motor parameters passed to the PMSM function consist of the following: 'p': number of poles 'l_d': inductance D-component 'l_q': inductance Q-component , 'j_rotor': Moment of inertia of the rotor 'r_s': 0.stator resistance We would like to know the exact function which implements the PMSM circuit. We would also like to know how to include mutual inductance in these motor parameters and change the PMSM circuit. We need to include mutual inductance of the stator windings in the circuit and we also prefer to make changes to the mutual inductance between the stator windings.
Request you to provide us this information in order to complete our project.
Thanks,
The ODE that is considered to model the electric behavior of the motor is given by:
(from the same documentation site that you also referenced)
In the code, the motor is represented via
(in https://github.com/upb-lea/gym-electric-motor/blob/master/gym_electric_motor/physical_systems/electric_motors/permanent_magnet_synchronous_motor.py). Herein, each column is associated to one of the variable values that are annotated in line 110.
Mutual inductance as of
is not implemented, (Retrieved from https://ei.uni-paderborn.de/lea/lehre/veranstaltungen/lehrangebote/geregelte-drehstromantriebe lecture notes can be downloaded at the bottom of the page). This would need to be modeled in three-phase coordinates, it seems.
In two-phase coordinates, one could make use of cross coupling inductances L_dq or L_qd, which are also not yet included.
For that, a model of the form
would need to be implemented into the code. (Equations retrieved from https://ieeexplore.ieee.org/abstract/document/9376968).
This should fit well into the given structure. However, a mechanism to change motor parameters mid-simulation (e.g., to consider saturation effects) is also not yet provided. I guess one could code this quick and dirty by accessing the parameters at runtime.
From our side, an implementation of these features in the foreseeable future is not realistic. We would highly appreciate to hear from your solution if you decide to implement it in GEM yourself.
Hi, there is a stripped-down environment for a PMSM with differential inductances support at
https://github.com/ExcitingSystems/exciting-environments/blob/main/exciting_environments/saturated_pmsm/saturated_pmsm_env.py
Maybe this helps for the time being