Opened 5 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: Lennart Ochel
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@…> 5 years ago.
screenshot.png (115.8 KB ) - added by Paul van der Hulst <p.van.der.hulst@…> 5 years ago.
Screenshot
plot.PNG (19.3 KB ) - added by Francesco Casella 5 years ago.

Download all attachments as: .zip

Change History (7)

by Paul van der Hulst <p.van.der.hulst@…>, 5 years ago

Attachment: TDMclock2.mo added

by Paul van der Hulst <p.van.der.hulst@…>, 5 years ago

Attachment: screenshot.png added

Screenshot

comment:1 by Francesco Casella, 5 years ago

Component: *unknown*Run-time
Milestone: Future1.16.0
Owner: changed from somebody to Lennart Ochel
Priority: normalcritical
Version: v1.14.1v1.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?

by Francesco Casella, 5 years ago

Attachment: plot.PNG added

comment:2 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:3 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:4 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.