1 / 100

System Modelling Models of Concurrency and their Applications

This paper discusses the modelling process for input-output systems, time-variant and time-invariant systems, state space modelling, linear and nonlinear systems, and deterministic and stochastic systems.

johnx
Download Presentation

System Modelling Models of Concurrency and their Applications

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. System ModellingModels of Concurrency and their ApplicationsApril 2001Axel Jantsch Royal Institute of Technology

  2. The Input-Output Modelling Process Input variables: {u1(t), ..., up(t)} t0t  tf Output variables: {y1(t), ..., ym(t)} t0t  tf u(t) = [u1(t), ..., up(t)]T y(t) = [y1(t), ..., ym(t)]T y1(t) = g1(u1(t), ..., up(t)) ... ym(t) = gm(u1(t), ..., up(t)) y = g(u) = [g1(u1(t), ..., up(t)), ..., gm(u1(t), ..., up(t))]T Axel Jantsch, ESDlab, KTH Ex 1.2

  3. input output System The Modelling Process Model y = g(u) u(t) Axel Jantsch, ESDlab, KTH

  4. Static and Dynamic Systems • A static system is one where the output y(t) is independent of past values of the input u(τ), τ < t for all t. • A dynamic system is one where the output generally depends on past values of the inputs. Axel Jantsch, ESDlab, KTH

  5. Time-Variant and Time-Invariant Systems In general g may depend on the time: y = g(u, t) A system is time-invariant or stationary if an inputu(t) results in an outputy(t), then the inputu(t-) results in the outputy(t-), for any. Axel Jantsch, ESDlab, KTH

  6. u(t) y(t) t t Time-Invariance u(t) y(t) t t   Axel Jantsch, ESDlab, KTH

  7. The Concept of State The state of a system at time t0 is the information required at time t0 such that the output y(t), for all t t0, is uniquely determined from this information and from u(t), t t0. The state is a vector of state variables x(t) = [x1(t), …, xn(t)] Axel Jantsch, ESDlab, KTH

  8. State Space Modelling The set of equations required to specify the state x(t) for all t t0, given x(t0) and the function u(t),t t0, are called state equations. The state space of a system, denoted by X, is the set of all possible values that the state may take. State equations are often differential equations, e.g. x`(t) = f(x(t), u(t),t) Axel Jantsch, ESDlab, KTH

  9. A Complete State Space Model State equations: x`(t) = f(x(t), u(t), t) Initial state: x(t0) = x0 Output equations: y(t) = g(x(t), u(t), t) Axel Jantsch, ESDlab, KTH

  10. State Space Modelling y(t) = g(x(t), u(t), t) x`(t) = f(x(t), u(t), t) u(t) Axel Jantsch, ESDlab, KTH

  11. Special Cases • Static systems: x`(t) = 0 for all t, e.g. no state change • Time invariant systems:x`(t) = f(x(t), u(t))y(t) = g(x(t), u(t)) Axel Jantsch, ESDlab, KTH Ex 1.3 Ex 1.5

  12. Linear and Nonlinear Systems • A scalar function g(u) is linear if and only if g(a1 u1 + a2u2) = a1g(u1) + a2g(u2) • A vector function g(u) is linear if and only ifg(a1 u1 + a2u2) = a1g(u1) + a2g(u2) • A system is linear if and only if both state equation function f and output equation function g are linear. Axel Jantsch, ESDlab, KTH

  13. Linear System Models • Linear time variant systems:x`(t) = A(t) x(t) + B(t) u(t)y(t) = C(t) x(t) + D(t) u(t) • Linear time invariant systems:x`(t) = Ax(t) + Bu(t)y(t) = Cx(t) + Du(t) • With nstate variables,moutput variables, pinput variables: A(t) … nnmatrixB(t) … npmatrixC(t) … mnmatrixD(t) … mpmatrix Axel Jantsch, ESDlab, KTH

  14. State Space • Continuous-state models: the state space X is a continuum, e.g. X= or X=n • Discrete-state models:the state space is a discrete set, e.g. X= orX={0,1} orX={“blue”, “red”, “green”} Axel Jantsch, ESDlab, KTH Ex 1.9

  15. Deterministic and Stochastic Systems • A deterministic model:Given an initial condition x(t0) and inputs u(t) for t t0, the system state x(t) and output y(t) can be predicted for all t > t0. • A stochastic model:At least one of the outputs y(t) is a random variable.The state of a stochastic model describes a random process, whose behaviour can be described probabilistically. Axel Jantsch, ESDlab, KTH

  16. Discrete-Time Systems • Difference equations replace differential equations:x(k+1) = f(x(k), u(k), k)x(0) = x0y(k) = g(x(k), u(k), k) • Linear discrete-time systems:x(k+1) = A(k) x(k) + B(k) u(k)y(k) = C(k) x(k) + D(k) u(k) • Linear, time-invariant discrete-time systems:x(k+1) = A x(k) + Bu(k)y(k) = C x(k) + Du(k) Axel Jantsch, ESDlab, KTH

  17. Time-Driven vs. Event-Driven Systems • Time-driven:At every clock tick an event e is selected from the event set E. If no event takes place, we speak of a “null event”, whose property is that it causes no state change. • Event-driven:At various time instances, which are not necessarily known in advance and not necessarily coinciding with clock ticks, some event e occurs and triggers a system reaction. Axel Jantsch, ESDlab, KTH Ex 1.12

  18. CVDS vs. DES • Continuous-Variable Dynamic Systems (CVDS): • They are continuous-state systems. • The state transition mechanism is time-driven. • Discrete Event Systems (DES): • The state space is a discrete set. • The state transmission mechanism is event-driven. Axel Jantsch, ESDlab, KTH

  19. Timed and Untimed Discrete Event Systems • Untimed Discrete Event System:The input is specified as an event sequence <e1, e2, …>, without any information about the occurrence times of these events. • Timed Discrete Event Systems:The input is specified as a timed event sequence <(e1,t1), (e2,t2), …>. In this case we can determine the time instances of state changes and output events. Axel Jantsch, ESDlab, KTH 1.3.3 Q.S.

  20. System Classifications • Static and Dynamic Systems • Time-Varying and Time-Invariant Systems • Linear and Non-Linear Systems • Continuous-State and Discrete-State Systems • Continuous-Time and Discrete-Time Systems • Time-Driven and Event-Driven Systems • Deterministic and Stochastic Systems Axel Jantsch, ESDlab, KTH

  21. System Taxonomy Tree System Static Dynamic Time-varying Time-invariant Linear Non-linear Continuous-state Discrete-state Continuous-time Discrete-time Time-driven Event-driven Deterministic Stochastic Axel Jantsch, ESDlab, KTH

  22. The Rugby Meta Model • Abstraction in the five Domains: • Function • Structure • Time • Data • Design Process Axel Jantsch, ESDlab, KTH

  23. Means to Handly Complexity Complexity Abstraction Partitioning Hierarchy Domains Axel Jantsch, ESDlab, KTH

  24. Abstraction, Hierarchy and Domain • Abstractiondefinesthe type of information presentin a model. •  When you move up one abstraction level you remove information. •  When you move down one abstraction level you make a decision. • Hierarchydefines the amount of information presented in a model •  When you move up one hierarchy level you hide information •  When you move down one hierarchy level you uncover details • A Domain is an aspect of a model that can logically be analyzed independently from other aspects. Axel Jantsch, ESDlab, KTH

  25. Time Computation Communication Data The Rugby Meta-Model Physical System Idea Low abstraction High abstraction Development time line Axel Jantsch, ESDlab, KTH

  26. Computation Hardware Transistor Logic Block System Relation and Constraints System Function Concurrent Processes, Algorithms Software Instruction Set Axel Jantsch, ESDlab, KTH

  27. Communication Hardware Layout Topology System Inter-process Communication Structural and Interface Constraints Parameter Passing Software Addressing Modes Axel Jantsch, ESDlab, KTH

  28. Time Physical Time Hardware Clocked Time System Timing Constraints Causality Software Processor Cycle Time Axel Jantsch, ESDlab, KTH

  29. Data Analog Value Hardware Logic Value System Symbol Number Data Type Constraints Software Processor Data Types (bit,byte,word) Axel Jantsch, ESDlab, KTH

  30. Rugby Summary • Separates the modelling issues computation, communication, time and data; • Defines abstraction levels in these four domains independently; • Allows to organize the design phases with respect to the abstraction levels; Axel Jantsch, ESDlab, KTH

  31. s2 s3 s1 P2 P1 s4 s5 P3 Process Networks A combinatorial function such that if A process pis determinate if Then we also write Axel Jantsch, ESDlab, KTH

  32. …, f(Ei+2), f(Ei+1), f(Ei), ... …,Ei+2, Ei+1, Ei, ... f s’ s Process Constructor mapC • A process constructor is a template to create processes from combinatorial functions. Axel Jantsch, ESDlab, KTH

  33. s and s’ are untimed signals; V=, f1(x)=x2 p1=mapC(f) …, 8,7,6,5,4,3,2,1,0 …, 21,12,3 p3 s’ s s and s’ are timed signals; V=T=, fd((t,x))=(t+d,x) p2=mapC(fd) …, 4,3,2,1,0 …, 16,9,4,1,0 p1 s’ s s and s’ are untimed signals; V=, f3(<x,y,z>)=x+y+z p3=mapC(f) …,(2,2),(1,1),(0,0) …,(d+2,2),(d+1,1),(d,0) p2 s’ s Process Constructor - Examples - Axel Jantsch, ESDlab, KTH

  34. Process Constructor mealyC • mealyC resembles a Mealy type finite state machine. …,f2(E2,w2), f2(E1,w1), f2(E0,w0) …, E2, E1, E0 f2 f1 wi s s’ Axel Jantsch, ESDlab, KTH

  35. Process Constructor zipWithC • zipWithC zips two input signals into one. …,Ei+2, Ei+1, Ei, ... s …, f(Ei+2, E’i+2), f(Ei+1 , E’i+1), f(Ei , E’i), ... f s” s’ …,E’i+2, E’i+1, E’i, ... Axel Jantsch, ESDlab, KTH

  36. The Characteristic Function • A characteristic function Fp of a process p is a function that, given a suitable partition of the input signals into sub-signals, when applied to all sub-signals, will completely generate the output signals. Examples: Axel Jantsch, ESDlab, KTH

  37. Discrete Event Simulation • For some problems we need timing information: • Determining the maximum frequency of a design; • Verifying timing constraints; • Functionality may depend on timing behaviour; • Discrete Event Model of Computation (DE): • T = non-negative integers; • Each computation is associated with a delay  0. Axel Jantsch, ESDlab, KTH

  38. Delays in a Netlist of Gates 1.8 ns 1.8 ns a x b 2.1 ns 1.5 ns y c Assume it is important: x = 0  y = 1 Axel Jantsch, ESDlab, KTH

  39. 1.8 ns 1.8 ns 1.8 ns 1.8 ns 1.8 ns 1.8 ns a 0 a a 0 1 0 1 1 1 1 1 0 x 0 x 0 x b b b 2.1 ns 2.1 ns 2.1 ns 1.5 ns 1 1.5 ns 1.5 ns 0 0 0 0 0 0 1 0 y y y c c c at time t’+1.5ns at time t at time t’ 1.8 ns 1.8 ns 1.8 ns 1.8 ns a a 0 0 1 1 0 0 0 0 x x b b 2.1 ns 2.1 ns 1.5 ns 1.5 ns 1 1 0 1 0 0 y y c c at time t’+3.3ns at time t’+3.6ns Propagation in a Netlist Axel Jantsch, ESDlab, KTH

  40. A Naïve Discrete Event Model • External events  Evaluation of nodes  generation of events  … • Each event has a time stamp; • Time stamps of all events are totally ordered; • Each computation has a delay  0; • Communication takes no time; • The evaluation order of simultaneous events is undefined  Nondeterminism; • Some descriptions with feed-back loops have no solution; Axel Jantsch, ESDlab, KTH

  41. e’ at t e’’ at t e at t e at t Simultaneous Events It is not defined in which order C should process events e and e’’. A B 0 delay C A B 0 delay C Axel Jantsch, ESDlab, KTH

  42. 0 delay I (t,1) O (t,?) Feed-back Loops in the Naïve DE Model Axel Jantsch, ESDlab, KTH

  43. e’’ at t+  e’ at t e at t e at t D Delays DDelay based discrete event models are deterministic because 0-delay computation is eliminated. A B 0 delay C C A B 0 delay Axel Jantsch, ESDlab, KTH

  44. Delta Time time t+ t+2 t+3 ... 0 ... t t+1 ... Between two time instances t and t+1 are infinitely many time instances t+i, i>0 Axel Jantsch, ESDlab, KTH

  45. Zero Delay Feed-back Loops I (t,0) O (t+,1) I (t’,1) O …, (t’+3,0), (t’+2,1), (t’+,0), (t’, 1) The model allows infinite feed back loops between t and t+1 Axel Jantsch, ESDlab, KTH

  46. Event List tp ... tq ... (i, vi’) (j, vj’) * tr While ( event list not empty) begin t = next time in list process entries for time t end ... ... Axel Jantsch, ESDlab, KTH

  47. no more events Advance simulation time Determine Current Events Done A B C Update Value t+ t t t t Propogate Events Evaluate activated elements A B C Schedule resulting events A B C Event Driven Simulation Axel Jantsch, ESDlab, KTH

  48. sort(…, f(Ei+2), f(Ei+1), f(Ei), …) …,Ei+2, Ei+1, Ei, ... f s’ s Process Constructor mapDE • mapDE is a refinement of mapC and implements the discrete event model. Axel Jantsch, ESDlab, KTH

  49. …,(v3,t3), (v2,t2), (v1,t1) …, (f(v2),t5), (f(v1),t4) f g s’ s …,(v3,t3), (v2,t2), (v1,t1) …,(f(v2),t5), (f(v3),t6), (f(v1),t4) f g s’ s Time Dependences Axel Jantsch, ESDlab, KTH

  50. …,(v3,3), (v2,2), (v1,1) …, (f(v2),5), (f(v1),4) f g s’ s …,(v3,3), (v2,2), (v1,1) …,(f(v2),5), (f(v3),4.6), (f(v1),4) f g s’ s Time Dependences - Example Axel Jantsch, ESDlab, KTH

More Related