Opened 14 years ago

Last modified 14 years ago

#1363 closed defect (fixed)

Simulation of Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc from MSL3.1 goes into an infinite loop.

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone:
Component: Simulation Code Generation Version: 1.6.0
Keywords: Cc: Adrian Pop, Frenkel TUD, Willi Braun

Description

Modelica.Electrical.Analog.Examples.ControlledSwitchWithArc from MSL3.1 seems to go into an infinite loop.

Change History (3)

comment:1 by Jens Frenkel, 14 years ago

The solver DASSRT reduce the stepsize after 0.593 seconds and the solver information value IDID switches from 3 to 1

/* IDID = 1 -- A step was successfully taken in the */
/* intermediate-output mode. The code has not */
/* yet reached TOUT. */

The solver continue with a very small stepsize. It is not a loop but we have to know the reason for the reduced stepsize.

comment:2 by Jens Frenkel, 14 years ago

The equations:

  • switch2.quenched = switch2.off AND (abs(constantVoltage2.n.i) <=  abs(switch2.v) * switch2.Goff OR pre(switch2.quenched))
  • 0.0 = if switch2.on then switch2.v - switch2.Ron * constantVoltage2.n.i else if switch2.quenched then constantVoltage2.n.i - switch2.Goff * switch2.v else switch2.v - min(switch2.Vmax,switch2.V0 + switch2.dVdt * (time - switch2.tSwitch)) * sign(constantVoltage2.n.i)

build a linear mixed equation system. In function function_updateDependents the linear mixed equation system is solved but in the function functionODE is a linear systems solved and not a linear mixed systems. The problem is that switch2.quenched can not change the value until IDID is 1 because the function function_updateDependents is not called and  switch2.quenched is only set in the function  function_updateDependents.

comment:3 by Martin Sjölund, 14 years ago

This now simulates, although it's listed as wrong result in the testsuite

Note: See TracTickets for help on using tickets.