Comments (18)
Is the speed, when given by the ConstantSpeedLoad, a kind of reference/ target value, which should be achieved by the controlled current?
Should therefore the speed have a similar behavior as the ReferenceGenerators?
from gym-electric-motor.
Is the speed, when given by the ConstantSpeedLoad, a kind of reference/ target value, which should be achieved by the controlled current?
The ConstantSpeedLoad is meant for a scenario where the speed is dictated by external means. This could e.g. be the case in a power plant, where speed is determined by control of combustion processes or turbines, and the control of the electric motor / generator focuses more (or entirely) on the electrical behavior.
So, in this scenario speed is an external signal. However, it is not the same as a reference!
This scenario implies that the speed as given by the ConstantSpeedLoad is "physically present" from the very beginning. This means that the speed state of the motor has been fixed and can not be changed.
Should therefore the speed have a similar behavior as the ReferenceGenerators?
Of course it is possible that our external "speed source" has changing speed. To simulate this case, it would be quite useful to apply the funnction generators we already have. However, this should then be implemented in a different class or after renaming the class.
(It would be very confusing to apply the "ConstantSpeedLoad" and still get a non-constant speed.) You could e.g. solve this by renaming the class to something like "ExternalSpeedLoad" and allow to parameterize this class to either output constant speed or changing speed.
from gym-electric-motor.
Added new class ExternalSpeedLoad in mechanical_loads.py. You can define a external Speedprofile for the load by handing a functionobject to the class. The functionobject can be for example a numpy function or a self defined lambda function.
Additional properties to the speedprofile (like amplitude, ...)can be given to the class as additional paramters ( **kwargs).
Eventually additional testscripts have to be added soon.
from gym-electric-motor.
internal review done. comments fixed by @GitPascalP .
Moving task to 'done'
from gym-electric-motor.
I checked the accuracy of the target and system value for the speed profile. I don't know if the frequencies I tried are similar to a real use case, but I think it reveals the most important things.
My target is the speed_profile(t + tau) calculated directly. The Systemvalue comes from the step() - Funktion. The Error between the signals goes up for higher frequencies and is a little bit dependent on the initial value (the system needs a moment to get to the actual profile). For a sine, the errors look similar.
from gym-electric-motor.
one additional remark:
i pushed a new branch (issue_#9_and_30), where connected my issues, as it was possible. So maybe only the one branch should be checked, when both issues are in the done column.
from gym-electric-motor.
Omega is normalized within this plot, I suppose?
I think one could interprete it better if it was not.
How about negative speed?
from gym-electric-motor.
Yes it is normalized on the plot. Now unnormalized and with negative speed.
from gym-electric-motor.
Thank you for these diagrams. As it does not look as accurate as I would have wished, I took a look at the code and I think I found a minor bug (in class ExternalSpeedLoad):
If I am not mistaken it should be
return "...(1 / self._tau)..."
instead of
return "...(self.j_total / self._tau)..."
Could you please try this?
Eventually additional testscripts have to be added soon.
Maybe this should also be added to the next sprint phase if it has not been covered yet.
from gym-electric-motor.
I think the result should look like this, or did I miss something?
The result looks quite idealized:
I think it is a matter of interpretation if the system follows the profile directly or the load follows the profile with inertia.
from gym-electric-motor.
Has this diagram now been produced after my correction idea has been implemented?
Looks way better. The speed seems to follow the desired profile more precisely.
Here is my short derivation to the problem:
Speed_Profile_Torque_Estimation.pdf
The mechanical_ode is supposed to return omega_dot, which has unit 1/s^2. With j_total put into the equation the units do not fit.
from gym-electric-motor.
The Diagram is from after your correction. I think there was a wrong thought on my side. The mechanical_ode function should give the differential of the state back (omega dot) and not T. For some reasons I forgot this last step
from gym-electric-motor.
Please execute another round of testcases like for these diagrams.
This time, plot the speed error (omega_target-omega_system).
Please include tests for all available solvers:
https://upb-lea.github.io/gym-electric-motor/parts/physical_systems/ode_solvers/ode_solver.html?highlight=solvers
from gym-electric-motor.
Here are the error plots.
For every plot, I used a new environment, initialized with a different solver.
(the second plot zoomed in the peak from timestep [600, 800]
from gym-electric-motor.
I believe the results are already looking promissing, but I would like to really check a little bit deeper:
- For which of the above speed profiles are these error plots, 16 Hz? And could please provide an estimate of the domega/dt during the linear transients during these speed profiles.
- Considering an extreme scenario that an electric motor is stopped from max. speed to zero speed within a gear box due to the clutch usage, I would expect angular mech. speed gradients of up to 15000 1/s^2. If the above baseline simulations' gradients are much less dynamic, could you please adjust your simulation according to my extreme case scenario and report errors on this basis.
from gym-electric-motor.
the plots before are plotted with max 12 Hz. With 16 Hz no big difference occurred (with signals like triangle). For the extreme Motorstop, I used a normal sawtooth signal and used the mechanical ode output (or the direct calculation of the state difference divided by tau). Gradient and error plot are following. The error is ,for the scipy solvers, higher and the gradient gets big as you proposed.
from gym-electric-motor.
I believe the accuarcy is sufficient - of course the error is large whenver there is really a jump within the speed profile, but that has to be accepted due to the used implementation way. Error is also not increasing over time, that's good.
However, please add a specific in-line comment and/or doc string information to the class pointing out that the the usage of the simple Euler discretization is only an approximation and that small differences between the inserted and the actual speed profile may occur.
From my side the core functionality of the code increment is achieved and the auxillary stuff (unit tests, docu,...) can be quickly finalized before a pull request is executed.
from gym-electric-motor.
Done
from gym-electric-motor.
Related Issues (20)
- Can you email me, please ? HOT 1
- Log Variables on each Time Step in PMSM Example Notebook[feature request] HOT 10
- incompatibility with gym >0.24.0 HOT 9
- Improve ReferenceGenerator chapter in Gem_Cookbook
- Flat velocity plot for scim_ideal_grid_simulation.py HOT 2
- Limit values for PMSM motor appear to be a peak to peak value vs an amplitude value HOT 2
- Do GEM currently support 3-phase brushless motor control? HOT 3
- Typo in the calculation of the decoupling HOT 1
- Feature Request: migrate from gym to gymnasium HOT 5
- Documentation is showing only current API (no past releases APIs)
- Phase voltage accuracy for PMSM motors HOT 5
- ConstReferenceGenerator enters the reference_name not as string into the env
- gem modularization
- modularization
- CosSinProcessor calculates Cosinus and Sinus based on normalized Epsilon
- DqToAbcActionProcessor calculates advanced angle wrongly
- Extend the GEM cookbook to explain voltage supply usage
- change the nominalization of the voltage
- Change the mapping of discrete switching states in FiniteB6BridgeConverter
- Hi, We are using the GEM library for testing the functionality of PMSM as a part of our undergraduate project. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gym-electric-motor.