1k likes | 1.02k Views
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.
E N D
System ModellingModels of Concurrency and their ApplicationsApril 2001Axel Jantsch Royal Institute of Technology
The Input-Output Modelling Process Input variables: {u1(t), ..., up(t)} t0t tf Output variables: {y1(t), ..., ym(t)} t0t 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
input output System The Modelling Process Model y = g(u) u(t) Axel Jantsch, ESDlab, KTH
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
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
u(t) y(t) t t Time-Invariance u(t) y(t) t t Axel Jantsch, ESDlab, KTH
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
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
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
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
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
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
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) … nnmatrixB(t) … npmatrixC(t) … mnmatrixD(t) … mpmatrix Axel Jantsch, ESDlab, KTH
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
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
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
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
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
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.
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
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
The Rugby Meta Model • Abstraction in the five Domains: • Function • Structure • Time • Data • Design Process Axel Jantsch, ESDlab, KTH
Means to Handly Complexity Complexity Abstraction Partitioning Hierarchy Domains Axel Jantsch, ESDlab, KTH
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
Time Computation Communication Data The Rugby Meta-Model Physical System Idea Low abstraction High abstraction Development time line Axel Jantsch, ESDlab, KTH
Computation Hardware Transistor Logic Block System Relation and Constraints System Function Concurrent Processes, Algorithms Software Instruction Set Axel Jantsch, ESDlab, KTH
Communication Hardware Layout Topology System Inter-process Communication Structural and Interface Constraints Parameter Passing Software Addressing Modes Axel Jantsch, ESDlab, KTH
Time Physical Time Hardware Clocked Time System Timing Constraints Causality Software Processor Cycle Time Axel Jantsch, ESDlab, KTH
Data Analog Value Hardware Logic Value System Symbol Number Data Type Constraints Software Processor Data Types (bit,byte,word) Axel Jantsch, ESDlab, KTH
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
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
…, 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
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
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
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
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
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
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
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
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
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
0 delay I (t,1) O (t,?) Feed-back Loops in the Naïve DE Model Axel Jantsch, ESDlab, KTH
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
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
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
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
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
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
…,(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
…,(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