Feb 26, 2016
Principles of
Engineering System Design
Dr T Asokan
Principles of
Engineering System Design
Dr T Asokan
GRAPHICAL MODELLING TECHNIQUES
BEHAVIOR MODELING Method used for exploring the dynamics of the system.
Address the discrete-event behavior, which is behavior that is triggered by the occurrence of specific events.
• Control, activation, and termination of system functions
• Ex: FFBD ( Functional Flow Block Diagrams), Behavior diagrams, Petrinets
FFBDs provide a hierarchical decomposition of the systems function and show a control structure that dictates the order in which the function can be executed at each level of the decomposition.
• Series, Concurrent, selection, and multiple exit
Petri Nets• First introduced by Carl Adam Petri in 1962.• A diagrammatic tool to model concurrency and
synchronization in distributed systems.• Used as a visual communication aid to model
the system behaviour.• Based on strong mathematical foundation.• Captures precedence relations and structural
interactions of potentially concurrent and asynchronous events.
Asokan T ED 309
A Petri Net Specification ...• consists of three types of components: places
(circles), transitions (rectangles) and arcs (arrows):– Places represent possible states of the system (P= p1,p2,
….)– Transitions are events or actions which cause the change
of state (T=t1,t2…); And– Every arc simply connects a place with a transition or a
transition with a place.
t1p1
p2
The state of PN is defined by the marking.
Asokan T ED 309
A Change of State …• is denoted by a movement of token(s)
(black dots) from place(s) to place(s); and is caused by the firing of a transition.
• The firing represents an occurrence of the event or an action taken.
• The firing is subject to the input conditions, denoted by token availability.
t1
Asokan T ED 309
A Change of State• A transition is firable or enabled when there
are sufficient tokens in its input places.• After firing, tokens will be transferred from
the input places (old state) to the output places, denoting the new state.
Asokan T ED 309
Example: EFTPOS System (A Petri net)
Initial
1 digit 1 digit 1 digit 1 digit
d1 d2 d3
d4
OK
OKpressed
approve
approved
OK OK OKOK
RejectRejected!
(EFTPOS= Electronic Fund Transfer Point of Sale)
Asokan T ED 309
EFTPOS System
• Scenario 1: Normal – Enters all 4 digits and press OK.
• Scenario 2: Exceptional – Enters only 3 digits and press OK.
Asokan T ED 309
Example: EFTPOS System (Token Games)
Initial
1 digit 1 digit 1 digit 1 digit
d1 d2 d3
d4
OK
OKpressed
approve
approved
OK OK OKOK
RejectRejected!
Asokan T ED 309
Example: Vending Machine
• The machine dispenses two kinds of snack bars – Rs 20 and Rs 15.
• Only two types of coins can be used – Rs 10 coins and Rs 5 coins.
• The machine does not return any change.
Asokan T ED 309
Example: Vending Machine (A Petri net)
5
Take Rs 15 bar
Deposit 5
0
Deposit 10
Deposit 5
10
Deposit 10
Deposit5c
Deposit 1020
Deposit5
15
Take Rs 20 bar
Asokan T ED 309
Example: Vending Machine (3 Scenarios)
• Scenario 1: – Deposit 5, deposit 5, deposit 5, deposit 5, take Rs
20 snack bar.• Scenario 2:
– Deposit 10, deposit 5, take Rs15 snack bar.• Scenario 3:
– Deposit 5, deposit 10, deposit 5, take Rs20 snack bar.
Asokan T ED 309
Example: Vending Machine (Token Games)
5
Take Rs 15 bar
Deposit 5c
0c
Deposit 10
Deposit 5
10
Deposit 10
Deposit5
Deposit 1020
Deposit5
15
Take Rs 20 bar