Opened 13 years ago
Closed 12 years ago
#1611 closed defect (invalid)
TriggeredSampler with Feedback leads to Internal Error
Reported by: | Peter Junglas | Owned by: | Peter Junglas |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | |
Keywords: | Cc: | Peter Junglas, Frenkel, TUD, Willi Braun |
Description
Running the model {{triggeredsampler1}} leads to the error
{{{ Error: Internal error BackendDAEUtil.incidenceMatrix failed
Error: Internal error sorting equations(strong components failed)}}}
The model {{triggeredsampler2}}, using a TriggeredSampler without feedback, works.
Attachments (2)
Change History (5)
by , 13 years ago
Attachment: | triggeredsampler2.mo added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
The is problem is that the model produce an algebraic loop involving a when equation, which is not that easy to solve(Dymola does not support that model). You can change the model and break the loop by using the pre operator.
My suggestion:
model triggeredsampler1 Modelica.Blocks.Sources.BooleanPulse booleanpulse1(period = 3); Modelica.Blocks.Discrete.TriggeredSampler triggeredsampler1; Modelica.Blocks.Math.Add add1(k1 = -1); Modelica.Blocks.Sources.Constant constant1(k = 1); Modelica.Blocks.Interfaces.RealOutput tmp; equation pre(add1.y) = tmp; connect(tmp,triggeredsampler1.u); connect(constant1.y,add1.u2); connect(triggeredsampler1.y,add1.u1); connect(booleanpulse1.y,triggeredsampler1.trigger); end triggeredsampler1;
However, we need there a better error message.
comment:4 by , 12 years ago
Cc: | added; removed |
---|---|
Component: | → Backend |
Resolution: | → invalid |
Status: | accepted → closed |
Error-message now says "[...] Try to break the loop by using the pre operator [...]"
The problem seems to be that BackendDAETransform.findDiscreteEquation gets a BackendDAE.WHEN_EQUATION which it doesn't know what to do with.