Changes between Initial Version and Version 3 of Ticket #5462


Ignore:
Timestamp:
2019-05-10T14:22:42Z (6 years ago)
Author:
Francesco Casella
Comment:

In fact you are right, with the current parameter settings, the opAmp model uses this equation to compute the output voltage:

v_out = smooth(0, noEvent(if V0*v_in>vps then vps else if V0*v_in<vns then vns else V0*v_in));

so there are in fact no events in this simulation. Unfortunately, the solver statistics are not shown (see issue 1.), so I didn't notice.

Anyway, it still seems that the C runtime deals with the if-expression in a somwhat wrong way, even in the presence of both smooth() and noEven() operators.

I tried to improve the description of the ticket.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5462

    • Property Summary Sloppy event detectionInaccurate simulation of systems with noEvent and saturations using the C runtime
  • Ticket #5462 – Description

    initial v3  
    1 Event detection in OMC is a bit sloppy, as exemplified by the {{{Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator}}} model.
     1When signal saturations are modelled using {{{noEvent()}}}, the C runtime has some issues, as exemplified by the {{{Modelica.Electrical.Analog.Examples.OpAmps.Multivibrator}}} model.
    22
    331.