Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StrayLoad loss model in MSL.Electrical.Machines, speeds that cross zeros #2184

Closed
markusandres3DS opened this issue Feb 21, 2017 · 4 comments
Assignees
Labels
bug Critical/severe issue L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic
Milestone

Comments

@markusandres3DS
Copy link

markusandres3DS commented Feb 21, 2017

Model:

Modelica.Electrical.Machines.Losses.InductionMachines.StrayLoad

Problem descritpion:

Picking a parameter "power_w" that is not a full number (in my case I chose 0.4) gives problems when the speed is going through zero during simulation.

Possible fix:

A possible fix seems to be the addition of a noEvent additionally to the smooth operator. Could be e.g. the following:

if (strayLoadParameters.PRef <= 0) then
tau = 0;
else
tau = -strayLoadParameters.tauRef*(iRMS/strayLoadParameters.IRef)^2*
smooth(1, noEvent(if w >= 0) then +(+w/strayLoadParameters.wRef)^strayLoadParameters.power_w
else -(-w/strayLoadParameters.wRef)^strayLoadParameters.power_w);
end if;

The combination of smooth + noEvent can be discussed of course, but as a proof-of-concept it seems to work fine for me.

@dietmarw dietmarw added enhancement New feature or enhancement L: Electrical.Machines Issue addresses Modelica.Electrical.Machines labels Feb 21, 2017
@AHaumer
Copy link
Contributor

AHaumer commented Mar 4, 2017

To be honest, after looking into that I'm unsure about the smooth ...
I think we should replace the noEvent by abs (which triggers no event!), i.e.
tau = -strayLoadParameters.tauRef*(iRMS/strayLoadParameters.IRef)^2*
(abs(w)/strayLoadParameters.wRef)^strayLoadParameters.power_w

@AHaumer
Copy link
Contributor

AHaumer commented Mar 4, 2017

The stray load loss model and the permanent magnet loss model should have the same issue:
Modelica.Electrical.Machines.Losses.InductionMachines.StrayLoad
Modelica.Electrical.Machines.Losses.InductionMachines.PermanentMagnetLosses
Modelica.Electrical.Machines.Losses.DCMachines.StrayLoad
Modelica.Magnetic.QuasiStatic.FundamentalWave.Losses.StrayLoad
Modelica.Magnetic.QuasiStatic.FundamentalWave.Losses.PermanentMagnetLosses
We should add an example for testing to ModelicaTest and then test the new implementation comparing it with respect to the old implementation.

@AHaumer AHaumer added this to the MSL_next-MINOR-version milestone Mar 4, 2017
@AHaumer AHaumer added bug Critical/severe issue L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic and removed enhancement New feature or enhancement labels Mar 4, 2017
AHaumer pushed a commit that referenced this issue Mar 5, 2017
AHaumer pushed a commit that referenced this issue Mar 5, 2017
@AHaumer
Copy link
Contributor

AHaumer commented Mar 5, 2017

resolved by SHA-1: f8c9490 for maint/3.2.2
resolved by SHA-1: 2d0c141 for master

@AHaumer AHaumer closed this as completed Mar 5, 2017
@markusandres3DS
Copy link
Author

As abs() results in the same as a noEvent() for that case, it seems to be an equally good solution to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Electrical.Machines Issue addresses Modelica.Electrical.Machines L: Magnetic.QuasiStatic Issue addresses Modelica.Magnetic.QuasiStatic
Projects
None yet
Development

No branches or pull requests

3 participants