ModelicaStandardLibrary icon indicating copy to clipboard operation
ModelicaStandardLibrary copied to clipboard

Add starting point for figures in Electrical Machines, PowerConvertes, QuasiStatic

Open maltelenz opened this issue 6 months ago • 2 comments

These originate from figures created for Wolfram System Modeler, and are likely to need cleanup and improvement.

Our one existing figure in MSL is probably a good style to follow:

https://github.com/modelica/ModelicaStandardLibrary/blob/3f72865f0764cad0f2fb2d47d1e3fc0bf96ec4e6/Modelica/Blocks/package.mo#L159-L180

Creating as Draft to indicate that library officer(s) probably want/should improve them before merging.

maltelenz avatar Jul 16 '25 10:07 maltelenz

I investigated this PR using Dymola2025x.

Units

This may be a Dymola issue, but the provided plots do not show units:

image

(Dymola does not show time units -- but this is a very different issue.)

Units and signals

The PowerConverter examples show separated current and voltage waveforms. The units are in this case correctly display by Dymola2025x:

image

Under some coditions (e. g. in Modelica.Electrical.PowerConverters.Examples.DCAC.PolyphaseTwoLevel.PolyphaseTwoLevel_RL) the units are displayed correctly:

image

This may be caused by the (not correctly determined) units of the signal outputs of the current and voltage sensors.

Units and axis

The provided examples

  • Modelica.Electrical.Machines.Examples.DCMachines.DCEE_Start
  • Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Start
  • Modelica.Electrical.Machines.Examples.DCMachines.DCPM_Temperature
  • Modelica.Electrical.Machines.Examples.DCMachines.DCPM_withLosses
  • Modelica.Electrical.Machines.Examples.DCMachines.DCSE_SinglePhase
  • Modelica.Electrical.Machines.Examples.DCMachines.DCSE_Start
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_DOL
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_Inverter
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_Transformer
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_YD
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMS_Start
  • Modelica.Electrical.Machines.Examples.SynchronousMachines.SMPM_Inverter
  • Modelica.Electrical.Machines.Examples.SynchronousMachines.SMR_Inverter

show

  • current (A)
  • torque (N.m)
  • speed (rev/min)

in one subplot. As the speed has a very different scale and behavior, it may make sense to show speed in a different subplot. Current and torque are much more physically connected, so it makes sense to show them in one diagram. For two figure with two different units I prefer plots with two different y axis.

Similar issues of "unequal units with one axis" occur in:

  • Modelica.Electrical.PowerConverters.Examples.DCDC.HBridge.HBridge_DC_Drive: voltage and speed
  • Modelica.Electrical.QuasiStatic.SinglePhase.Examples.ParallelResonance and Modelica.Electrical.QuasiStatic.SinglePhase.Examples.SeriesResonance: length and angle (which shall be in deg, so the DisplayUnit may have to be set properly, first)

Compare differently

In example Modelica.Electrical.Machines.Examples.DCMachines.DCPM_QuasiStatic it may make sense to directly compare

  • transient and quasi static current
  • transient and quasi static torque
  • transient and quasi static speed

in three different subplots.

Failed investigations

Models I could not test due to #4696 are:

  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_Conveyor
  • Modelica.Electrical.Machines.Examples.InductionMachines.IMC_withLosses

christiankral avatar Sep 22 '25 08:09 christiankral

I agree with @christiankral that the issue (showing units) has to be resolved. A workaround could be: Split the plots into subplots.

AHaumer avatar Sep 22 '25 15:09 AHaumer