﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6053	Issue with ASCC and state selection in HanserModelica	Francesco Casella	Karim Adbdelhak	"Please check [https://libraries.openmodelica.org/branches/newInst/HanserModelica/files/HanserModelica_HanserModelica.SynchronousMachines.SMEE_ShortCircuit2.err HanserModelica.SynchronousMachines.SMEE_ShortCircuit2]. The backend processing fails at some point because of singular linear equations / circular equalities. I suspect the ASCC algorithm may be involved, since the system contains an induction motor with the usual three-phase inductors current constraint.

More specifically, {{{-d=bltdump}}} reports a fixed state selection

{{{
1: smee.phiMechanical:STATE(1,smee.wMechanical)(start = -(3.141592653589793 + gamma0) / /*Real*/(smee.p) unit = ""rad"" fixed = true )  ""Mechanical angle of rotor against stator""HanserModelica.SynchronousMachines.SMEE_ShortCircuit2, Modelica.Magnetic.FundamentalWave.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited type: Real 
2: smee.excitation.electroMagneticConverter.Phi.re:STATE(1)(unit = ""Wb"" )  ""Real part of complex number""HanserModelica.SynchronousMachines.SMEE_ShortCircuit2, Modelica.Magnetic.FundamentalWave.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited, Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SinglePhaseWinding, Modelica.Magnetic.FundamentalWave.Components.SinglePhaseElectroMagneticConverter, Modelica.SIunits.ComplexMagneticFlux type: Real 
3: smee.stator.core.Phi.im:STATE(1)(unit = ""Wb"" )  ""Imaginary part of complex number""HanserModelica.SynchronousMachines.SMEE_ShortCircuit2, Modelica.Magnetic.FundamentalWave.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited, Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SymmetricMultiPhaseWinding, Modelica.Magnetic.FundamentalWave.Components.EddyCurrent, Modelica.SIunits.ComplexMagneticFlux type: Real 
4: smee.stator.core.Phi.re:STATE(1)(unit = ""Wb"" )  ""Real part of complex number""HanserModelica.SynchronousMachines.SMEE_ShortCircuit2, Modelica.Magnetic.FundamentalWave.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited, Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SymmetricMultiPhaseWinding, Modelica.Magnetic.FundamentalWave.Components.EddyCurrent, Modelica.SIunits.ComplexMagneticFlux type: Real 
5: smee.stator.zeroInductor.i0:STATE(1)(unit = ""A"" ) HanserModelica.SynchronousMachines.SMEE_ShortCircuit2, Modelica.Magnetic.FundamentalWave.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited, Modelica.Magnetic.FundamentalWave.BasicMachines.Components.SymmetricMultiPhaseWinding, Modelica.Electrical.MultiPhase.Basic.ZeroInductor type: Real 
}}}
and immediatly afterwards reports a singularity
{{{
[3] 16:47:38 Symbolic Warning
The linear system: 
1 : smee.is[2] = -smee.is[1]
2 : 3.0 * smee.stator.zeroInductor.i0 = smee.is[1] + smee.is[2] + smee.is[3]
[
  1.0 , 1.0 ;
  -1.0 , -1.0
]
  *
[
  smee.is[2] ;
  smee.is[1]
]
  =
[
  0.0 ;
  smee.is[3] + (-3.0) * smee.stator.zeroInductor.i0
]
 might be structurally or numerically singular for variable smee.is[1] since U(2,2) = 0.0. It might be hard to solve. Compilation continues anyway.
}}}
I am pretty sure {{{smee.stator.zeroInductor.i0}}} shouldn't be a state, maybe @christiankral can comment on that.


For your reference, Dymola selects a fixed state and four dynamically selected states
{{{
Statically selected continuous time states
constantSpeed.phi

Dynamically selected continuous time states
There is one set of dynamic state selection.
There are 4 states to be selected from:
smee.excitation.electroMagneticConverter.Phi.re
smee.is[1]
smee.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re
smee.rotorCage.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im
smee.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[1].Phi.re
smee.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.im
}}}
"	defect	new	blocker	1.19.0	Backend				dr.christiankral@…
