Title: ECE 449549
1ECE 449/549
- Class Notes 1
- Introduction to System Modeling Concepts and DEVS
- Sept. 2008
2Systems Specification Formalisms
- System theory distinguishes between system
structure (the inner constitution of a system)
and behavior (its outer manifestation).
Fig. 1 Basic System Concepts
3Hierarchical System Decomposition
- Decomposition, composition, hierarchical
construction, Closure under composition - Modular systems have recognized input and output
ports through which all interaction with the
environment occurs. They can be coupled together
by coupling output ports to input ports and can
have hierarchical structure in which component
systems are coupled together to form larger ones.
4Relation to Object Orientation
- Both objects and system models share a concept of
internal state. However, mathematical systems
are formal structures that operate on a time base
while programming objects typically do not have
an associated temporal semantics. - While coupling establishes output-to-input
pathways, the systems modeler is completely free
to specify how data flows along such channels. - Although systems models have formal temporal and
coupling features not shared by conventional
objects, object-orientation does provide a
supporting computational mechanism for system
modeling.
5Evolution of Systems Formalisms
Basic Systems Specification Formalisms
6Introducing the DEVDESS Formalism
7Combining Continuous And Discrete Formalisms
Introducing Quantized System
8Extensions of DEVS
9DEVS as a Computational Basis for Simulation,
Design and Control
10Levels of System Knowledge
George Klirs Klir 1985 systems framework.
11Hierarchy of Systems Specifications
12Input / output system
13The Specification Levels Informally Presented
1. Observation Frame (Level 0)
A forest specified as a system in the Observation
Frame (Level 0)
14I/O Behavior and I/O Function
Some Input-Output Pairs for the Forest System
Frame (Level 1 2)
15State Transition System Specification(Level 3)
16Coupled Component System Specification
Component Structure System Specification for the
Forrest System (Level 4)
17System Specification Morphisms Basic Concepts
A morphism is a relation that places elements of
system descriptions into correspondence. morphic,
if we can place their defining elements -
inputs, outputs, and time bases into
correspondence
Morphism Concepts for System Specification
Hierarchy
18Morphism relations between systems in System
Specification Hierarchy and Klirs levels.
19Homomorphism
Homomorphism Concept. This figure illustrates
the preservation of state transitions that a
homomorphism requires. Homomorphism a mapping
preserving step-by-step state transition and
output
20Basic Entities and Relations in Modeling and
Simulation
Experimental Frame
Source
Simulator
System
behavior database
Modeling Relation
Simulation Relation
Model
21DEVS Formalism
- DEVS Discrete Event Systems Specification
- Atomic Models
- Coupled Models
- Hierarchical Models
22Discrete Event Time Segments
X
t1
t0
t2
S
e
y0
Y
23DEVS Atomic Model
Elements of an atomic model
- input events
- output events
- state variables
- state transition functions
- output function
- time advance function
24Atomic Model Operation
- Ports are represented explicitly there can be
any number of input and output ports on which
values can be received and sent - The time advance function determines the maximum
lifetime in a state - A bag can contain many elements with possibly
multiple occurrences of its elements. - Atomic DEVS models can handle bags of inputs and
outputs. - The external transition function handles inputs
of bags by causing an immediate state change,
which also may modify the time advance. - The output function can generate a bag of outputs
when the time advance has expired. - The internal transition function is activated
immediately after the output function causing an
immediate state change, which also may modify the
time advance. - The confluent transition function decides the
next state in cases of collision between external
and internal events.
25Basic specification
DEVS ltX,S,Y, dint , d ext ,dcon, ta,l gt X a
set of input events. Y a set of output events.
S a set of states ta S -gt R0,inf time
advance function dint S -gt S internal
transition function. d ext Q x Xb -gt S
external transition function, d con Q x Xb -gt S
confluent transition function, where Xb is
a set of bags over elements in X. Q
(s,e)se S, 0lt e lt ta(s) l S -gt Y output
function
26DEVS Atomic Model Implements Basic DEVS
Make a transition (internal)
Make a transition (external)
input
State
internal
external
time advance
Handle input
output
output
Hold for some time
Send an output
27Internal Transition /Output Generation
using the output function
using the internal transition function
28Response to External Input
using the external transition function
elapsed time
Time advance
29Response to Simultaneous External Input and
Internal Event
elapsed time
using the confluent transition function
Time advance
30Atomic Model Examples
pulse
Pulse Generator
time
interPulseTime gt0
Pulse Generator
Output
start
ta 8
Output
Fire-once Neuron
Input
Firing delay gt0
ta 8
ta 8
external event
Internal event
output event
31Basic DEVS Example Scuba Model
dint (five) for phase ! five ,surface1,
surface2 dint (five,s ) otherwise //except
when already on five
32DEVS Hierarchical Modular Composition
- Atomic lowest level model, contains structural
dynamics -- model level modularity
Coupled composed of one or more atomic and/or
coupled models
hierarchical construction
coupling
33ENTITY
Object Oriented DEVS CLASSES
DEVS
ATOMIC
devs
COUPLED
MESSAGE
CONTAINER
content
entity
port, value -gt ENTITY
34external transition function
output function
void procdeltext(timetype e,message x)
Continue() if (phase_is("passive"))
for (int i0 ilt x-gtget_length()i)
if (message_on_port(x,"in",i)) job
x-gtget_val_on_port("in",i)
hold_in("busy",processing_time)
message procout( ) if
(phase_is("busy")) message m new
message() entity val job
m-gtadd(make_content("out",val)) return m
internal transition function
void procdeltint( ) passivate()
in
out
s
y
x
job
phase
s
ATOMIC
35Coupled model specification
DN lt X ,Y,D,Mi ,Ii ,Zi,j gt X a set of
input events. Y a set of output events. D an
index set for the components of the coupled
model. For each i e D , Mi is a component
DEVS model. For each i e D u self , Ii is the
set of influencees of i . For each j e D u
self , Zi,j is output
translation mapping
36 DIGRAPH
37Closure Under Coupling
Every Devs Coupled model has a Devs Basic
equivalent
38Hierarchical Construction
39SYSTEM ENTITY STRUCTURE
EFA
EFA-DEC
ARCH
EF
ARCH-SPEC
EFA-DEC
MULT
PROC
GENR
TRANSD
MULT-DEC
COORD
40(No Transcript)
41Simulation Cycle for DEVS Parallel /Confluent
- Compute the global next event time, tN use
reduce to get minimum of component times to next
event (tN) - Tell all components the global tN and
- if component is imminent (tN global tN ),
- then generate output
message(using l) - Sort and distribute (using coupling) output
messages. - Tell all components
- if component is imminent (tN global tN )
- or has incoming mail
(external events) - or both
- then execute transition function
(wrap_deltfunc).
42Simulation Cycle Step 1
Compute the next event time (tN) uses reduction
to get minimum of the component times to
next event.
Collection of Minimum tN Values
i
compute tN
return MIN tN
Low Node
8
i
11
i
High Node
43Simulation Cycle Step 2
Tell all components global tN if
component is imminent generate and sort output
messages
i
compute_IO
Low Node
2
i
6
i
5
i
3
4
i
i
8
i
9
i
11
10
i
i
High Node
44Mail Exchange in Step3
tell all imminents, sort, and distribute output
messages (mail) using coupling
45Simulation Cycle Step 4
Tell all components with to execute their
transition functions.
i
wrap_deltfunc
Low Node
2
i
6
i
5
i
3
4
i
i
8
i
9
i
11
10
i
i
High Node