Dynamic structure modelling for Causal Block Diagrams Master Thesis - - PowerPoint PPT Presentation

dynamic structure modelling for causal
SMART_READER_LITE
LIVE PREVIEW

Dynamic structure modelling for Causal Block Diagrams Master Thesis - - PowerPoint PPT Presentation

Dynamic structure modelling for Causal Block Diagrams Master Thesis by Yves Maris Promotors: Fernando Barros, Hans Vangheluwe 1 Overview Background: Causal Block Diagrams Syntax Semantics Problem statement Dynamic structure


slide-1
SLIDE 1

1

Dynamic structure modelling for Causal Block Diagrams

Master Thesis by Yves Maris Promotors: Fernando Barros, Hans Vangheluwe

slide-2
SLIDE 2

2

Overview

– Background: Causal Block Diagrams

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-3
SLIDE 3

3

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-4
SLIDE 4

4

Causal Block Diagrams Abstract Syntax

slide-5
SLIDE 5

5

Causal Block Diagrams Visual Syntax

slide-6
SLIDE 6

6

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-7
SLIDE 7

7

Causal Block Diagrams semantics

slide-8
SLIDE 8

8

Background: flattening

– Purely syntactical – Needed for loop detection

slide-9
SLIDE 9

9

Background: Evaluation Order

– Dependenties beween blocks – Topological sort

slide-10
SLIDE 10

10

Loop detection

– Strong component algorithm – Use gausian solver for implicit solution

slide-11
SLIDE 11

11

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-12
SLIDE 12

12

Problem Statement

– Expressiveness limited by fixed structure – Changing model during simulation – Staying consistent with CBD constructs

slide-13
SLIDE 13

13

Schedule

– Background: Causal Block Diagrams – Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-14
SLIDE 14

14

Abstract Syntax

slide-15
SLIDE 15

15

Visual syntax: explicit representation

– Reuse of existing graph transformation syntax – Left-hand side before – Right-hand side after – Trigger trough input port

slide-16
SLIDE 16

16

Visual syntax: implicit representation

– Trigger received trough CBD input port – Added structures: green – Removed structures: red

slide-17
SLIDE 17

17

Visual syntax: hybrid representation

– Mix between implicit and explicit representation – Implicit representation separated by block – Simulated model isolated

slide-18
SLIDE 18

18

Visual syntax: comparison

– Implicit representation not expressive enough – Hybrid representation

– Same expressiveness as explicit representation – More compact

slide-19
SLIDE 19

19

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Visual syntax – Semantics

– Implementation – Case study: elevator model

slide-20
SLIDE 20

20

Related work

– Hybrid CBD

– Mustafiz, Sadaf, et al. "Towards Modular Language Design Using Language Fragments: The Hybrid Systems Case Study." Information Technology: New Generations. Springer International Publishing, 2016. 785-797.

– Uses signal crossing

– Dynamic structure DEVS (DSDEVS)

– Barros, Fernando J. "Modeling formalisms for dynamic structure systems."ACM Transactions on Modeling and Computer Simulation (TOMACS) 7.4 (1997): 501-515.

– Heterogeneous flow systems

– Barros, Fernando J. "Dynamic structure multiparadigm modeling and simulation." ACM Transactions on Modeling and Computer Simulation (TOMACS) 13.3 (2003): 259-275.

– Use of model executive

slide-21
SLIDE 21

21

Triggering a change: zero crossing

– Piecewise constant signal to “event” – Pre and post condition – Implemented using basic blocks

slide-22
SLIDE 22

22

Triggering a change: zero crossing

– Signal must cross zero from below

– Previous iteration: condition must be not satisfied – Current iteration: condition must be satisfied

slide-23
SLIDE 23

23

Triggering a change: timed event

– Generating “event” after a fixed number of timesteps – Value determined when intialised

slide-24
SLIDE 24

24

Modeling a change: structure block

– Features of a dynamic structure formalism

– Identification of existing structures – Creation of new structures – Removal of existing structures – Initialisation of values

slide-25
SLIDE 25

25

Modeling a change: structure block

– Structure block = adapted CBD specification – Structure function for modelling change – Multiple input/ no output ports

– Default 1: event that triggers a change – Other input ports for initialisation of values

– Changes apply only to one CBD! (hierarchical)

slide-26
SLIDE 26

26

Modeling a change: examples

slide-27
SLIDE 27

27

Modeling a change: examples

slide-28
SLIDE 28

28

Adapted operational semantics

slide-29
SLIDE 29

29

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-30
SLIDE 30

30

Implementation

slide-31
SLIDE 31

31

Implementation: AToMPM

– Visual modeling enviroment

slide-32
SLIDE 32

32

Metadepth

– Exported AToMPM model using built in functionality – Supports EGL for code generation

slide-33
SLIDE 33

33

XML

– Readable models – Consistent declarations – Remove tags

slide-34
SLIDE 34

34

Python

– Parser generates code including structure functions – Simulator implemented in python

– Extended CBD simulator from MOSIS course

slide-35
SLIDE 35

35

Debugging

– Test driven development – Traces

slide-36
SLIDE 36

36

Overview

– Background: Causal Block Diagrams (CBD)

– Syntax – Semantics

– Problem statement – Dynamic structure CBD

– Syntax – Semantics

– Implementation – Case study: elevator model

slide-37
SLIDE 37

37

Case Study

– Balls in elevator – Doors open when elevator reaches floor – Balls can enter and leave elevator trough door

slide-38
SLIDE 38

38

Modeling a Ball

slide-39
SLIDE 39

39

Position with constant velocity

slide-40
SLIDE 40

40

Position with constant acceleration

slide-41
SLIDE 41

41

Velocity CBD for elevator wall

slide-42
SLIDE 42

42

Demo

slide-43
SLIDE 43

43

Execution plots

slide-44
SLIDE 44

44

Execution plots

slide-45
SLIDE 45

45

Execution plots

slide-46
SLIDE 46

46

Future work

– Advanced scheduling of structure blocks – Optimisation techniques – Comparison to other methods (hybrid systems)

slide-47
SLIDE 47

47

Questions?