Report

Principles of Engineering System Design Dr T Asokan [email protected] Principles of Engineering System Design GRAPHICAL MODELLING TECHNIQUES Dr T Asokan [email protected] 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. 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. The state of PN is defined by the marking. p1 p2 t1 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) (EFTPOS= Electronic Fund Transfer Point of Sale) 1 digit Initial 1 digit d1 1 digit d2 1 digit d4 d3 OK OK OK OK OK OK pressed Rejected! Reject approve approved 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) 1 digit Initial 1 digit d1 1 digit d2 1 digit d4 d3 OK OK OK OK OK OK pressed Rejected! Reject approve approved 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) Take Rs 15 bar Deposit 10 5 15 Deposit 5 Deposit 5 0 Deposit 5c Deposit 10 Deposit 5 20 10 Deposit 10 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) Take Rs 15 bar Deposit 10 5 15 Deposit 5c Deposit 5 0c Deposit 5 Deposit 10 10 Deposit 5 20 Deposit 10 Take Rs 20 bar Asokan T ED 309