Opened 7 years ago

Last modified 7 years ago

#4535 new defect

Structural singularity related to electric ground placement

Reported by: Pierre Haessig <pierre.haessig@…> Owned by: Lennart Ochel
Priority: high Milestone: Future
Component: Backend Version: v1.12.0
Keywords: Cc: Patrick Täuber, Volker Waurich

Description

I've been trying to model three phase inverters (AC-DC converters, similar to the MSL example Modelica.Electrical.PowerConverters.Examples.DCAC.MultiPhaseTwoLevel.MultiPhaseTwoLevel_RL, but using discrete MSL Electrical.Analog and Electrical.Ideal components). I've been hit by Symbolic Warning that some equation sub-system is structurally or numerically singular, and indeed the simulation fails at time 0.0 (unable to solve linear system).

I've created a minimal example to reproduce the issue (cf. QuickRInverterSingle.mo file). It has the topology of a single phase inverter, but using resistors instead of switches (to remove any source of error coming from non linear elements). The key aspect is that the AC side is made of two inductors with the ground connected between the two. This may looks weird, but this mimics the typical three-phase case when the ground is connected to the neutral point. This means that some state variables (inductor currents) are algebraically coupled.

Simulation of this model fails, unless the ground is placed somewhere else.

Maybe I'm missing something, but I believe that the system should have a solution no matter the placement of the ground.

I'm using OpenModelica 1.12.0~dev.alpha1 on Debian stretch.

Attachments (2)

QuickRInverterSingle.mo (3.6 KB ) - added by Pierre Haessig <pierre.haessig@…> 7 years ago.
model to reproduce the singularity issue
rL_loops_1.png (9.3 KB ) - added by Volker Waurich 7 years ago.
bipartite graph

Download all attachments as: .zip

Change History (12)

by Pierre Haessig <pierre.haessig@…>, 7 years ago

Attachment: QuickRInverterSingle.mo added

model to reproduce the singularity issue

comment:1 by Pierre Haessig <pierre.haessig@…>, 7 years ago

Thinking back about this issue, I believe the initial title is misleading, since the problem is not related to power electronics at all. It is only about groud placement. A better bug title could be "structural singularity related to electric ground placement".

comment:2 by Francesco Casella, 7 years ago

Summary: structural singularity when modeling invertersStructural singularity related to electric ground placement

See also #4115

comment:3 by Pierre Haessig <pierre.haessig@…>, 7 years ago

Thanks for the reference. It's not clear to me if this is connected, but I'm not knowledgeable in DAE initialization problem. Do you think this issue would be solved by implementing ideas from your 2012 paper "On the Formulation of Steady-State Initialization Problems in Object-Oriented Models of Closed Thermo-Hydraulic Systems" ?

in reply to:  3 comment:4 by Francesco Casella, 7 years ago

Replying to Pierre Haessig <pierre.haessig@…>:

Thanks for the reference. It's not clear to me if this is connected, but I'm not knowledgeable in DAE initialization problem. Do you think this issue would be solved by implementing ideas from your 2012 paper "On the Formulation of Steady-State Initialization Problems in Object-Oriented Models of Closed Thermo-Hydraulic Systems" ?

Possibly, but this would require adding stuff to the MSL, which means it should be first discussed and accepted by the Modelica Association.

Version 0, edited 7 years ago by Francesco Casella (next)

comment:5 by Francesco Casella, 7 years ago

Another option is to use the algorithms by Otter and Elmqvist described in this paper. This is something that only requires local implementation in the OMC back-end. I would actually recommend that we consider such algorithms, also for reasons beyond the scope of this ticket.

Last edited 7 years ago by Francesco Casella (previous) (diff)

comment:6 by Francesco Casella, 7 years ago

Cc: Patrick Täuber Volker Waurich added
Component: *unknown*Backend
Owner: changed from somebody to Lennart Ochel

I thought a bit more about this example, and I guess the problem is more related to index reduction. It is a well-known structural property of electrical circuits that the current going into the ground is always zero, so the two inductors are effectively series-connected, therefore the system is index 2 and so index reduction would be required to eliminate one of the two currents from the set of state variables in order to reduce the problem to index 1.

Unfortunately, this can only be performed if some symbolic manipulation is first carried out on the system to symbolically deduce that neutral.p.i = 0. Otherwise, this would just be a numerical result of solving the system equations, which cannot be used for symbolic index reduction, that is based on structural properties of the system.

What is then happening is that this model is an index-2 DAE, but OMC fails to recognize it as such, and when it tries to solve it, it runs into a singular Jacobian as expected. I tried

@vwaurich, @ptaeuber, I think this is an intriguing case for index reduction and reshuffling. Would you mind having a look?

by Volker Waurich, 7 years ago

Attachment: rL_loops_1.png added

bipartite graph

comment:7 by Volker Waurich, 7 years ago

Thanks for the example.
reshuffling would need some enhancements in order to resolve loop. The graph is pretty cross-linked and this is currently not covered by the default reshuffling. the orange nodes 3 and 6 are currents through the inductors.

comment:8 by Francesco Casella, 7 years ago

Dymola can handle this system, meaning that applies index reduction, so it can infer thata the ground current is zero symbolically. Unfortunately I have no idea what algorithm they use for that.

Last edited 7 years ago by Francesco Casella (previous) (diff)

comment:9 by Lennart Ochel, 7 years ago

I created a similar model without the usage of MSL components to make it easier to trace the transformations. Therewith, the problem is reproducible and I wonder why it isn't solved by resolveLoops.
How should we proceed with this ticket? I would like to test an idea that would probably solve that problem. However, if resolveLoops is already almost able to solve the issue, then it would probably worth it to work on it. Volker, what do you think?

Btw: Is reshuffling the same as resolveLoops?

comment:10 by Volker Waurich, 7 years ago

resolveLoops and reshuffling is the same. the reshuffle flag sets a parameter for the resolveLoops algorithm. The problem with this example is the intersection of loops in the graph. There was a version of resolveLoops which handles this but there was not much impact for having a very expensive loop-search covering intersected loop.
I will see, if I can tweak the implementation. At least a flag-based solution is doable.

Note: See TracTickets for help on using tickets.