Opened 4 years ago

Last modified 3 years ago

#6019 new defect

previous(y) is chattering in a discrete-time model

Reported by: p.van.der.hulst@… Owned by: lochel
Priority: critical Milestone:
Component: Run-time Version: v1.16.0-dev
Keywords: Cc:

Description

Hi,
I built a small wrapping counter with time-discrete blocks.
When simulating in openmodelica, One of the available outputs is previous(y).
As you see in the attached screenshot, the variable behaves very strange, quite different from y itself.
Additionally I'm confused by the fact that variables i and y are calculated between sampling ticks. This is not how I understand how it was intended (https://ep.liu.se/ecp/076/001/ecp12076001.pdf)

Best regards,
Paul van der Hulst

Attachments (3)

TDMclock2.mo (1.6 KB) - added by Paul van der Hulst <p.van.der.hulst@…> 4 years ago.
screenshot.png (115.8 KB) - added by Paul van der Hulst <p.van.der.hulst@…> 4 years ago.
Screenshot
plot.PNG (19.3 KB) - added by casella 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by Paul van der Hulst <p.van.der.hulst@…>

Changed 4 years ago by Paul van der Hulst <p.van.der.hulst@…>

Screenshot

comment:1 Changed 4 years ago by casella

  • Component changed from *unknown* to Run-time
  • Milestone changed from Future to 1.16.0
  • Owner changed from somebody to lochel
  • Priority changed from normal to critical
  • Version changed from v1.14.1 to v1.16.0-dev

There is clearly some bug in the recording of previous() variables. If you look at the detail in the plot.png attachment, at some point it actually goes backwards in time. Nice picture, vaguely reminding a Mondrian picture, but completely meaningless.

@Karim, @AnHeuermann, would you mind giving a look?

Changed 4 years ago by casella

comment:2 Changed 4 years ago by casella

  • Milestone changed from 1.16.0 to 1.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:3 Changed 3 years ago by casella

  • Milestone changed from 1.17.0 to 1.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:4 Changed 3 years ago by casella

  • Milestone 1.18.0 deleted

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.