Opened 12 years ago

Closed 12 years ago

#2178 closed defect (fixed)

non-linear sytem solver failed

Reported by: Christian Schubert Owned by: Willi Braun
Priority: high Milestone: 1.9.0
Component: Run-time Version: trunk
Keywords: non-linear sytem solver Cc:

Description

Hi,

we'll probably get a new company using OpenModelica if we can get the model attached to simulate properly.
It is a simple circuit made from components from Modelica.Electrical.Analog and Modelica.Blocks.
Currently it fails, solving a non-linear system when a step input is applied. The non-linear system in question is a combination of a hysteresis-block and an ideal switch.

This is what the system looks like:

torn nonlinear Equationsystem:
1: output  DC1_2.hysteresis.y:DISCRETE() .Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Blocks.Logical.Hysteresis, .Modelica.Blocks.Interfaces.BooleanOutput type: Boolean 
2: output  DC1_2.and1.y:DISCRETE()  "Connector of Boolean output signal".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Blocks.Logical.And, .Modelica.Blocks.Interfaces.BooleanOutput type: Boolean 
3:  DC1_2.R2.v:VARIABLE()  "Voltage drop between the two pins (= p.v - n.v)".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Electrical.Analog.Basic.Resistor, .Modelica.SIunits.Voltage type: Real 
4:  DC1_2.R2.i:VARIABLE()  "Current flowing from pin p to pin n".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Electrical.Analog.Basic.Resistor, .Modelica.SIunits.Current type: Real 
5:  DC1_2.idealClosingSwitch.i:VARIABLE()  "Current flowing from pin p to pin n".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Electrical.Analog.Ideal.IdealClosingSwitch, .Modelica.SIunits.Current type: Real 
1:  DC1_2.I_L.v:VARIABLE()  "Voltage drop between the two pins (= p.v - n.v)".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Electrical.Analog.Sources.SignalCurrent, .Modelica.SIunits.Voltage type: Real 
2:  DC1_2.idealClosingSwitch.s:VARIABLE(protected = true )  "Auxiliary variable".Transrech.Versuche.SprungRunter.mitBremsChopper, .Transrech.Modell, .Modelica.Electrical.Analog.Ideal.IdealClosingSwitch, .Real type: Real 
1/1 (1): DC1_2.hysteresis.y = DC1_2.I_L.v > DC1_2.hysteresis.uHigh or pre(DC1_2.hysteresis.y) and DC1_2.I_L.v >= DC1_2.hysteresis.uLow
2/2 (1): DC1_2.and1.y = DC1_2.hysteresis.y and DC1_2.enableBremsChopper
3/3 (1): DC1_2.R2.v = DC1_2.I_L.v - DC1_2.C2.v
4/4 (1): DC1_2.R2.v = DC1_2.R2.R_actual * DC1_2.R2.i
5/5 (1): DC1_2.idealClosingSwitch.i = DC1_2.idealClosingSwitch.s * (if DC1_2.and1.y then 1.0 else DC1_2.idealClosingSwitch.Goff)
1/1 (1): DC1_2.I_L.v = DC1_2.idealClosingSwitch.s * (if DC1_2.and1.y then DC1_2.idealClosingSwitch.Ron else 1.0)
2/2 (1): DC1_1.u + DC1_2.R2.i + DC1_2.idealClosingSwitch.i - DC1_2.L1.i = 0.0

Both Dymola and SimulationX simulate it without any warnings.

Maybe someone could have a look at it.

Attachments (2)

Transrech.mo (37.4 KB ) - added by Christian Schubert 12 years ago.
Library
Transrech.mos (175 bytes ) - added by Christian Schubert 12 years ago.
Script to simulate the model in question

Download all attachments as: .zip

Change History (6)

by Christian Schubert, 12 years ago

Attachment: Transrech.mo added

Library

by Christian Schubert, 12 years ago

Attachment: Transrech.mos added

Script to simulate the model in question

comment:1 by Christian Schubert, 12 years ago

I forgot this is the error message:

Simulation execution failed for model: Transrech.Versuche.SprungRunter.mitBremsChopper
stdout            | info    | model terminate | non-linear system solver failed. | Simulation terminated at time 1.00037

comment:2 by Willi Braun, 12 years ago

Status: newaccepted

comment:3 by Willi Braun, 12 years ago

fixed in r16038.
It's a bit slow, but seems to work correctly.

comment:4 by Willi Braun, 12 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.