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

Modelica.Electrical.Machines.Examples.InductionMachines.IMC_InverterDrive is numerically fragile? #4517

Open
casella opened this issue Jan 9, 2025 · 5 comments
Assignees
Labels
L: Electrical.Machines Issue addresses Modelica.Electrical.Machines
Milestone

Comments

@casella
Copy link
Contributor

casella commented Jan 9, 2025

The model Modelica.Electrical.Machines.Examples.InductionMachines.IMC_InverterDrive seems to be prone to numerical issues.

  • It works in Dymola 2024x with DASSL both at Tolerance = 1e-6 (as per the experiment annotation) and Tolerance = 1e-7 (stricter tolerance for the generation of reference trajectories)
  • It works in Dymola 2025x with DASSL at Tolerance = 1e-6
  • It fails in Dymola 2025x with DASSL at Tolerance = 1e-7 with error: "Next output point TOUT (=1.000000e+00) too close to initial/event time T (=1.000000e+00) to start integration."
  • It works in Dymola 2025x at both 1e-6 and 1e-7 tolerance if other solvers are used (IDA/CVODE/Radau)
  • It fails in OMC 1.25.0-dev-269 with DASSL and other solvers (IDA, ESDIRK) at Tolerance = 1e-6 and Tolerance = 1e-7 because of nonlinear solver failure on a strong component at time 0.1053

The failures in OMC can be attributed to the fact that the tool ends up with a large nonlinear torn system (116 unknowns, 23 iteration variables) that includes the auxiliary variables s of all the diodes and thyristors as iteration variables; Dymola does not report any nonlinear system, so it may be able to handle that more explicitly. However, also Dymola has issues with a normally robust solver (DASSL) if the tolerance is set to a too tight value, which is the one that should be used to generate the reference trajectory.

Reducing the communication interval length doesn't seem to be beneficial.

@casella casella added the L: Electrical.Machines Issue addresses Modelica.Electrical.Machines label Jan 9, 2025
@casella casella added this to the MSL4.1.0 milestone Jan 9, 2025
@casella
Copy link
Contributor Author

casella commented Jan 9, 2025

@henrikt-ma, @maltelenz can you please report how WSL manages to run this model?

@casella
Copy link
Contributor Author

casella commented Jan 9, 2025

@HansOlsson do you have any clues about the failure in Dymola 2025x?

@maltelenz
Copy link
Contributor

@henrikt-ma, @maltelenz can you please report how WSL manages to run this model?

I assume you mean in WSM (Wolfram System Modeler).

Historically (older versions of WSM) we have had issues with it, but in a recent version it passes using the experiment settings set in the model.

Our largest system (linear) is 39 variables torn to 12. This system does generate simulation warnings about not converging during event iterations, but despite these we manage to match the reference with our result.

A tighter tolerance of 1e-7 or even 1e-8 doesn't seem to result in any bad effects except a slightly longer simulation time.

@AHaumer
Copy link
Contributor

AHaumer commented Jan 10, 2025

It seems that we're discussing numerical issues of tools:

  • Dymola up to 2024x has no problems
  • Dymola 2025 brings up an error with tighter tolerance - @HansOlsson what's your opinion?
  • OM seems to have problems
  • Malte reports no problems with WSM

If this model is problematic also a lot of PowerElectronic models are problematic.
I have no idea how to proceed if tool developers can't solve that.

@HansOlsson
Copy link
Contributor

It seems that we're discussing numerical issues of tools:

  • Dymola up to 2024x has no problems
  • Dymola 2025 brings up an error with tighter tolerance - @HansOlsson what's your opinion?

I wouldn't worry about the problems for that model with tight tolerance in Dymola 2025x for the MSL release.
We will investigate it later.

  • OM seems to have problems
  • Malte reports no problems with WSM

If this model is problematic also a lot of PowerElectronic models are problematic. I have no idea how to proceed if tool developers can't solve that.

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

No branches or pull requests

5 participants