Opened 8 years ago

Last modified 3 years ago

#4041 assigned defect

Wrong structural singular equation system

Reported by: Rüdiger Franke Owned by: somebody
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc:

Description

The current tunc release reports the following error for PowerSystems.Examples.Spot.Introduction.SimulationSteadyInitial:

Error: Initialization problem is structurally singular, error found sorting equations 
 78: $DER.lineB.i[3] = 0.0;
75: $DER.lineL.i[3] = 0.0;
14: $DER.lineR.i[3] + $DER.lineB.i[3] - $DER.lineL.i[3] = 0.0;
72: $DER.lineR.i[3] = 0.0;
 for variables 
 meter.i[1](63), voltageL.V(70), $DER.lineR.i[3](77), meter.i[3](61), transPh.y[2](72)

See
https://test.openmodelica.org/libraries/PowerSystems/files/PowerSystems.Examples.Spot.Introduction.SimulationSteadyInitial.err

The solution to the reported equations appears obvious, even though it is for some reason overdetermined: all involved variables are zero. Why does OpenModelica report a structural singular equation system?

Note 1: the model was working until August 29, see:
https://test.openmodelica.org/libraries/history/PowerSystems/PowerSystems-2016-08-29.html
The PowerSystems library changed around that time with the introduction of an enumeration for initialization options, replacing Booleans, see:
https://github.com/modelica/PowerSystems/commit/7a8310bc7d36daee96538c4b0da4634d4a43343d

Note 2: the AC3ph models use the dq0 representation. The third coordinate is zero unless there is an unsymmetry between the three phases. Many models are symmetric by definition: sources assign 0.0 to variables of the third coordinate; component models pass the 0.0 through and never mix the third 0-coordinate with the d- or the q-coordinate.

Can't OpenModelica generally eliminate resulting equation systems with the rhs all zeros?

Change History (12)

comment:1 by Lennart Ochel, 8 years ago

Owner: changed from Lennart Ochel to Vitalij Ruge
Status: newassigned

This is related to an issue in the optimization module simplifyComplexFunction. As far as I can tell, this module should get removed anyway, because it is just a workaround for certain expressions that are handled wrongly in the Backend/SimCode phase. I assign this to Vitalij, because he developed that module, so probably he knows best how to fix this.


One can disable the module using following flag: --initOptModules-=simplifyComplexFunction.
Therewith, compilation works fine, but the initialization is not able to find a consistent solution:

Compilation output:

Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
Warning: The initial conditions are over specified. Use +d=initialization for more information.
Warning: There are iteration variables with default zero start attribute. Use +d=initialization for more information.

Simulation output:

Simulation execution failed for model: PowerSystems.Examples.Spot.Introduction.SimulationSteadyInitial
LOG_INIT          | error   | The initialization problem is inconsistent due to the following equation: 0 != -10581.1 = voltageB.V * cos(voltageB.alpha0) - lineB.term_n.v[1]
stdout            | warning | Error in initialization. Storing results and exiting.
|                 | |       | Use -lv=LOG_INIT -w for more information.

comment:2 by Lennart Ochel, 8 years ago

By the way, using the flag -d=initialization in addition will display the following message:

Notification: It was not possible to analyze the given system symbolically, because the relevant equations are part of an algebraic loop. This is not supported yet.
Warning: Assuming redundant initial conditions for the following 3 initial equations:
         lineR.omega[1] = 0.0
         lineL.omega[1] = 0.0
         lineB.term_n.v[1] = voltageB.V * cos(voltageB.alpha0)
[…]

comment:3 by Vitalij Ruge, 8 years ago

Can't OpenModelica generally eliminate resulting equation systems with the rhs all zeros?

There no removeSimpleEquation for initilization. So Initilization don't find the equation
0 = 0.

comment:4 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:5 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:6 by Vitalij Ruge, 8 years ago

Owner: changed from Vitalij Ruge to somebody

Unfortunately, I will not find time in the near future to fixed it.

comment:7 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:8 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:9 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:10 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:11 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:12 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.