arizona center for integrative modeling and simulation (acims)

26
Continuity and Change (Activity) Are Fundamentally Related In DEVS Simulation of Continuous Systems Bernard P. Zeigler Arizona Center for Integrative Modeling and Simulation (ACIMS) University of Arizona Tucson, Arizona 85721, USA[email protected] www.acims.arizona.edu

Upload: nash

Post on 08-Jan-2016

50 views

Category:

Documents


1 download

DESCRIPTION

Continuity and Change (Activity) Are Fundamentally Related In DEVS Simulation of Continuous Systems Bernard P. Zeigler. Arizona Center for Integrative Modeling and Simulation (ACIMS) University of Arizona Tucson, Arizona 85721, USA [email protected] www.acims.arizona.edu. Outline. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Continuity and Change (Activity) Are Fundamentally Related In DEVS Simulation of Continuous Systems

Bernard P. Zeigler

Arizona Center for Integrative Modeling and Simulation(ACIMS)

        University of Arizona

Tucson, Arizona 85721, [email protected]

Page 2: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Outline

• Review DEVS Framework for M&S

• Brief History of Activity Concept Development

• Summary of Recent Results

• Theory of Event Sets – Basis for Activity Theory

• Conclusions and Implications

Page 3: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Synopsis

• A continuous curve can be represented by a sequence of finite events sets whose points get closer together at just the right rate

• We can measure the amount of change in such a continuous curve – this is its activity

• The activity divided by the largest change in an event set gives the size of this set’s most economical representation

• DEVS quantization can achieve this optimal representation

Page 4: Arizona Center for Integrative Modeling and Simulation (ACIMS)

• DEVS = Discrete Event System Specification

• Based on formal M&S framework

• Derived from mathematical dynamical system theory

• Supports hierarchical, modular composition

• Object oriented implementation

• Supports discrete and continuous paradigms

• Exploits efficient parallel and distributed simulation techniques

DEVS Background

Page 5: Arizona Center for Integrative Modeling and Simulation (ACIMS)

DEVS Hierarchical Modular Composition

Atomic: lowest level model, contains structural dynamics -- model level modularity

Atomic

Atomic Atomic

Atomic

+ coupling

Coupled: composed of one or more atomic and/or coupled models

Atomic

Atomic

Atomic

Hierarchical construction

Page 6: Arizona Center for Integrative Modeling and Simulation (ACIMS)

DEVS Theoretical Properties

• Closure Under Coupling• Universality for Discrete Event Systems• Representation of Continuous Systems

– quantization integrator approximation– pulse representation of wave equations

• Simulator Correctness, Efficiency

Page 7: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Atomic Models

OrdinaryDifferentialEquationModels

Spiking NeuronModels

Coupled Models

Petri NetModels

Cellular Automata

n-Dim Cell Space

PartialDifferentialEquations

Self Organized Criticality

Models

Processing/Queuing/

Coordinating

ProcessingNetworks

Networks,Collaborations Physical

Space

DEVS Expressability

can becomponents in a coupled model

MultiAgent

Systems

Discrete Time/

StateChartModels

QuantizedIntegrator

Models

Spiking Neuron

Networks

Stochastic

Models

ReactiveAgent

Models

Fuzzy Logic

Models

Page 8: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Activity Theory unifies continuous and discrete paradigms

Heterogeneous activity in

time and space

Quantization allows DEVS to naturally focus computing resources on high activity regions

DEVS can represents all decision making

and continuous dynamic elements

DEVS concentrates its computational resources at the regions of high activity. While DEVS uses smaller time advance (similar to time step in DTSS) in regions of high activity. DTSS uses the same time step regardless of the activity.

Page 9: Arizona Center for Integrative Modeling and Simulation (ACIMS)

nD

(n-1)D

X>0

X<0

D

ta(nD) = |D/x|

nD

D

ta(q) = ((n+1)D-q)/x

e

X>0

X<0

q

ta(q) = |q-nD/x|

(n+1)D

Mapping Ordinary Differential Equation Systems into DEVS Quantized Integration

DEVSinstantaneous

function

DEVS Integrator

d s1/dt s1f1x

d s2/dt s2f2

d sn/dt snfn

sx

sx

sx

...

d s1 /dt s1f1x

d s2 /dt s2f2

d sn /dt snfn

sx

sx

sx

...

DEVSSDEVS

DEVS

F

F

FTheory of Modeling and Simulation, 2nd Edition, Bernard P. Zeigler , Herbert Praehofer , Tag Gon Kim , Academic Press, 2000.

Page 10: Arizona Center for Integrative Modeling and Simulation (ACIMS)

PDE Stability Requirements• Courant Condition requires smaller time step for

smaller grid spacing for partial differential equation solution

• This is a necessary stability condition for discrete time methods but not for quantized state methods

2

time step as a function

of number of cells for

given length

( )L

h N kN

quantum as a function

of number of cells for

given length

( )H

q NN

Ernesto Kofman, Discrete Event Based Simulation and Control of Hybrid Systems, Ph.D. Dissertation: Faculty of Exact Sciences, National University of Rosario, Argentina

Page 11: Arizona Center for Integrative Modeling and Simulation (ACIMS)

)(tf

t

quantum

Activity – a characteristic of continuous functions

dttfd

q)(

1t it nt

Activity(0,T) = 1 iiim m

b

a

Activity = |b-a|

#Threshold Crossings = Activity/quantum

Page 12: Arizona Center for Integrative Modeling and Simulation (ACIMS)

#DEVS Transitions = #Threshold Crossings

F1

F2

Counter

∑ ∫ 1/quantum

Comparator

Whenever there is a change in y, increment the counter to get the number of DEVS transitions.

x

y

1dy

dt

2dy

dt

R. Jammalamadaka,, Activity Characterization of Spatial Models: Application to the Discrete Event Solution of Partial Differential Equations, M.S. Thesis: Fall 2003, Electrical and Computer Engineering Dept., University of Arizona

( )

| ( ) |

dyf y

dt

dAf y

dt

Page 13: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Activity Calculations for 1-D Diffusion

Initial

stateActivity Activity/N

as N∞

Rectangular pulse

2HN(W/L)(1 –W/L) 2H(W/L)(1 –W/L)

Triangular pulse

(N-1)*H/4 H/4

Gaussian pulse

Constant/L

2ln

2* * 2* *

* 1

2 4* *

0.707

start

start

L

e c t

N H Lerf

L c t

erf

This shows that the activity per cell in all the three cases goes to a constant as N (number of cells) tends to infinity.

Page 14: Arizona Center for Integrative Modeling and Simulation (ACIMS)

DEVS Efficiency Advantage where Activity is Heterogeneous in Time and Space

Time Period

T

time stepsize

# time steps

=T/

tt

activityA

quantumq

# crossings=A/q

Potential Speed Up=

#time steps /# crossings

X

numberof

cells

Page 15: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Ratio: DTSS/DEVS Transitions

#

# /

1

where = ii

DTSS MaxDeriv T

DEVS A N

dyMaxDeriv Max

dt

Page 16: Arizona Center for Integrative Modeling and Simulation (ACIMS)

#DTSS/#DEVS Ratio for 1-D Diffusion

initial state DTSS/DEVS

Rectangular Pulse

where w is the width to the length ratio

Triangular Pulse

Gaussian Pulse

2

2

)1(2 Lww

TcN

2

4

L

TcN

3 1/ 2

0.062( )

( * )start

Tf L

c t

*f is an increasing function of L

0

400

800

1200

1600

0 50 000 100 000 150 000 200 000 250 000

Number of cells

Ex

ec

uti

on

tim

e (

s)

Explicit

Implicit

Quantized

Alexander Muzy’s scalability results

Page 17: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Muzy’s Fire Front model

Instantaneous Activity

Peak Bars

Accumulated Activity

Region Of Imminence

S. R. Akerkar, Analysis and Visualization of Time-varying data using the concept of 'Activity Modeling', M.S. Thesis, University of Arizona,2004

Page 18: Arizona Center for Integrative Modeling and Simulation (ACIMS)

DEVS vs DTSS in Parallel Distributed Simulation

J. Nutaro, Parallel Discrete Event Simulation with Application to Continuous Systems, Ph. D. Dissertation Fall 2003,, Univerisity of Arizona

Page 19: Arizona Center for Integrative Modeling and Simulation (ACIMS)

12

3

4

N-1

N

Q B

Q B

Q B

N/2 Units

.

.

.

12

3

4

N-1

N

1

3

4

N-1

N

2

Q B

Q B

Q B

N/2 Units

.

.

.

.

.

.

.

.

.

1

3

4

N-1

N

2

Q B

Q B

Q B

N/2 Units

.

.

.

.

.

.. . .

n = log2N Stages

Q = Quantizer B = Butterfly

N = 1024 (powers of 2) n = 10 (log2N)

q = Quantum for respective stage

QFFT Module

q = q0/N q = q0/(N-1) q = q0/1

.

.

.

.

.

.

Harsha Gopalakrishnan, DEVS Scalable Modeling of a High performance pipelined DIF FFT core with Quantization, MS Thesis U. Arizona.

Quantization in Digital Processing

Transmit to next stage only when quantum exceeded

Page 20: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Music 300 Hz - 3000 Hz Voice 300 Hz - 3000 Hz

0

10000000

20000000

30000000

40000000

50000000

60000000

0 0.05 0.1 0.15 0.2 0.25 0.3

Quantum

Co

mp

uta

tio

n T

ime

Reduction (at q0 = 0.06) = 52%

Input

300 – 3000 Hz QFFT Module(Forward Transform)

Output

QFFT Module(Backward Transform)

Analog LPF3000 Hz cut-off

QFFT System

0

5000000

10000000

15000000

20000000

25000000

30000000

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16

Quantum

Co

mp

uta

tio

n T

ime

Reduction (at q0 = 0.02) = 30.8%

At q = .02 At q = .06

Page 21: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Event Set Basics

{( , ) | 1... }i iE t v i n ( )size E n

1( ) | |i ii

Sum E v v 1( ) max | |i i iMax E v v

( ) {( * , * )}i iextrema E t v E 1( ) | * * | .i ii

Sum E v v

if E refines E E E ( ) ( )E refines E Sum E Sum E

E refines E

( ) ( ) iff wtbSum E Sum E E refines E

wtb ( ) ( )E refines E Max E Max E

Page 22: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Event set refinement sequence

size = 5

size = 9

size = 17

size = 33

Page 23: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Sum of Variations

MaximumVariation

Number of peaks detected

0 1 1A refinement sequence , ,..., , ,... such that:

( )

( ) / ( )

is a discrete event representation of a differentiable continuous function

i i

i

i i

E E E E

Sum E A

Max E k size E

Convergence of the Sum ,Maximum variation, and form factor

Page 24: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Domain and Range Based Event Sets

*tE domain-based event set with equally spaced domain points separated by step

.

qEdenote a range-based event set with equally spaced range values, separated by a quantum q

( ( )) ( )1

( ( )) ( )q

t

size E f Avg fR

size E f MaxDer f

( )( )

Sum fAvg f

domainIntervalLength

2

1 1R

nn

2( )O n

For an n-th degree polynomial we have

. So that potential gains of the order of are possible.

Page 25: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Conclusions

• Activity Theory confirms that where there is heterogeneity of activity in space and time, DEVS will have significant advantage over conventional numerical methods

• This lead us to try reformulating the math foundations of continuity in discrete event terms

Page 26: Arizona Center for Integrative Modeling and Simulation (ACIMS)

Implications• sensing– most sensors are currently driven at high sampling rates to

obviate missing critical events. Quantization-based approaches require less energy and produce less irrelevant data.

• data compression – even though data might be produced by fixed interval sampling, it can be quantized and communicated with less bandwidth by employing domain-based to range-based mapping.

• reduced communication in multi-stage computations, e.g., in digital filters and fuzzy logic is possible using quantized inter-stage coupling.

• spatial continuity–quantization of state variables saves computation and our theory provides a test for the smallest quantum size needed in the time domain; a similar approach can be taken in space to determine the smallest cell size needed, namely, when further resolution does not materially affect the observed spatial form factor.

• coherence detection in organizations – formations of large numbers of entities such as robotic collectives, ants, etc. can be judged for coherence and maintenance of coherence over time using this paper’s variation measures.

• education -- revamp teach of the calculus to dispense with its mysterious foundations (limits, continuity) that are too difficult to convey to learners.