1 / 40

ECE 449/549

ECE 449/549. Class Notes #1 Introduction to System Modeling Concepts and DEVS Sept. 2008. Systems Specification Formalisms. System theory distinguishes between system structure (the inner constitution of a system) and behavior (its outer manifestation). Fig. 1 Basic System Concepts.

flaura
Download Presentation

ECE 449/549

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 449/549 Class Notes #1 Introduction to System Modeling Concepts and DEVS Sept. 2008

  2. Systems Specification Formalisms • System theory distinguishes between system structure (the inner constitution of a system) and behavior (its outer manifestation). Fig. 1 Basic System Concepts

  3. Hierarchical 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.

  4. Relation 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.

  5. Evolution of Systems Formalisms Basic Systems Specification Formalisms

  6. Introducing the DEV&DESS Formalism

  7. Combining Continuous And Discrete Formalisms Introducing Quantized System

  8. Extensions of DEVS

  9. DEVS as a Computational Basis for Simulation, Design and Control

  10. Level Name What we know at this level 0 Source what variables to measure and how to observe them 1 Data data collected from a source system 2 Generative means to generate data in a data system 3 Structure components (at lower levels) coupled together to form a generative system Levels of System Knowledge George Klir’s [Klir 1985] systems framework.

  11. Level Specification Name Corresponds to Klir’s What we know at this level 0 Observation Frame Source System how to stimulate the system with inputs; what variables to measure and how to observe them over a time base; 1 I/O Behavior Data System time-indexed data collected from a source system; consists of input/output pairs 2 I/O Function knowledge of initial state; given an initial state, every input stimulus produces a unique output. 3 State Transition Generative System how states are affected by inputs; given a state and an input what is the state after the input stimulus is over; what output event is generated by a state. 4 Coupled Component Structure System components and how they are coupled together. The components can be specified at lower levels or can even be structure systems themselves – leading to hierarchical structure. Hierarchy of Systems Specifications

  12. Input / output system

  13. The Specification Levels Informally Presented 1. Observation Frame (Level 0) A forest specified as a system in the Observation Frame (Level 0)

  14. I/O Behavior and I/O Function Some Input-Output Pairs for the Forest System Frame (Level 1 & 2)

  15. State Transition System Specification(Level 3)

  16. Coupled Component System Specification Component Structure System Specification for the Forrest System (Level 4)

  17. System 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

  18. Level Specification Name Two Systems are Morphical at this level if: 0 Observation Frame their inputs, outputs and time bases can be put into correspondence 1 I/O Behavior they are morphic at level 0 and the time-indexed input/output pairs constituting their I/O behaviors also match up in one-one fashion 2 I/O Function they are morphic at level 0 and their initial states can be placed into correspondence so that the I/0 functions associated with corresponding states are the same 3 State Transition the systems are homomorphic (explained below) 4 Coupled Component components of the systems can be placed into correspondence so that corresponding components are morphic; in addition, the couplings among corresponding components are equal Morphism relations between systems in System Specification Hierarchy and Klir’s levels.

  19. Homomorphism   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

  20. Basic Entities and Relations in Modeling and Simulation Experimental Frame Source Simulator System behavior database Modeling Relation Simulation Relation Model

  21. DEVS Formalism DEVS = Discrete Event Systems Specification • Atomic Models • Coupled Models • Hierarchical Models

  22. x x 0 1 Discrete Event Time Segments X t1 t0 t2 S e y0 Y

  23. DEVS Atomic Model Elements of an atomic model: • input events • output events • state variables • state transition functions • output function • time advance function

  24. Atomic 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 internaltransition 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.

  25. Basic specification: DEVS = <X,S,Y, dint , d ext ,dcon, ta,l > X : a set of input events. Y: a set of output events. S: a set of states ta :S-> R+0,inf time advance function dint :S -> Sinternal transition function. d ext :Q x Xb-> Sexternal transition function, d con :Q x Xb-> Sconfluent transition function, where Xb is a set of bags over elements in X. Q= {(s,e)|se S, 0<= e<=ta(s)} l:S -> Youtput function

  26. DEVS 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

  27. Internal Transition /Output Generation output Generate output s’ Time advance s Make a transition using the output function using the internal transition function

  28. Response to External Input input Make a transition using the external transition function elapsed time Time advance

  29. Response to Simultaneous External Input and Internal Event output input Make a transition Generate output elapsed time using the confluent transition function Time advance

  30. start out receptive active passive fire refract Atomic Model Examples pulse Pulse Generator time Pulse Generator interPulseTime >0 Output start ta = ∞ Output Fire-once Neuron Input Firing delay >0 ta = ∞ ta = ∞ external event Internal event output event

  31. Dive Plan Emergency Phone Call Response Basic DEVS: Example Scuba Model =dint (“five”) for phase != “five” ,“surface1”, “surface2” dint (“five”,s ) otherwise //except when already on “five

  32. DEVS 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

  33. Legend inherits can hold ENTITY Object Oriented DEVS CLASSES DEVS ATOMIC devs COUPLED MESSAGE CONTAINER content entity port, value ->ENTITY

  34. Coupled model specification: DN = < X,Y,D,{Mi },{Ii },{Zi,j }> X : a set of input events. Y: a set of output events. D : an index set for the components of the coupled model. For eachieD , Mi is a component DEVS model. For eachieDu self, Iiis the set of influencees ofi . For eachjeDu self , Zi,jis output translation mapping

  35. create components class ef:public digraph{ public: ef():digraph(){ genr * g = new genr("g); transd * t = new transd("t"); add(g); add(t); ef out start start g result ariv out t in out done add coupling add_coupling(this, "in", t, "done"); add_coupling(this, "start", g, "start"); t->add_coupling(t,"out",g,"stop"); t->add_coupling(t, "out", this, "result"); g->add_coupling(g, "out", this, "out"); g->add_coupling(g, "out", t, "ariv"); declare ports inports->add("in"); outports->add("out"); inports->add("start"); outports->add("result"); DIGRAPH

  36. wrap_deltfunc(t,m) deltext(t-tN,m) deltint() deltcon(m) Simulation 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).

  37. Block (UI) Tell_all (next_tN) Ensemble Message + 2 i i + 1 compute tN compute tN return MIN tN return MIN tN + 5 + 6 i i + 4 i i + 3 compute tN compute tN compute tN compute tN return tN return MIN tN return MIN tN return MIN tN + 10 i i + 9 i + 7 compute tN compute tN compute tN compute tN compute tN return tN return tN return tN return tN return tN Simulation 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

  38. Tell_all (compute_IO) Ensemble Message i + 1 compute_IO compute_IO compute_IO compute_IO compute_IO compute_IO i + 7 compute_IO compute_IO compute_IO compute_IO compute_IO Simulation 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 + 4 i + 3 i i + 10 i + 9 + 11 + 8 i i High Node

  39. i + 4 + 3 i + 1 + 2 i i + 5 i Step 1 : Mail Message Size Information Step 2 : Mail Exchange Mail Exchange in Step3 tell all imminents, sort, and distribute output messages (mail) using coupling

  40. Tell_all (wrap_deltfunc) Ensemble Message i + 1 wrap_deltfunc wrap_deltfunc wrap_deltfunc wrap_deltfunc wrap_deltfunc wrap_deltfunc i + 7 wrap_deltfunc wrap_deltfunc wrap_deltfunc wrap_deltfunc wrap_deltfunc Simulation Cycle Step 4 Tell all components with to execute their transition functions. i wrap_deltfunc Low Node + 2 i + 6 i + 5 i + 4 i + 3 i i + 10 i + 9 + 11 + 8 i i High Node

More Related