Mapping ODEs to DEVS: Adaptive Quantization Jean-Sbastien Bolduc - - PowerPoint PPT Presentation

mapping odes to devs adaptive quantization
SMART_READER_LITE
LIVE PREVIEW

Mapping ODEs to DEVS: Adaptive Quantization Jean-Sbastien Bolduc - - PowerPoint PPT Presentation

Summer Computer Simulation Conference (SCSC03) Montral, july 2003 Mapping ODEs to DEVS: Adaptive Quantization Jean-Sbastien Bolduc Hans Vangheluwe Modelling, Simulation and Design Lab (MSDL) School of Computer Science McGill


slide-1
SLIDE 1

Summer Computer Simulation Conference (SCSC’03) Montréal, july 2003

Mapping ODEs to DEVS: Adaptive Quantization

Jean-Sébastien Bolduc Hans Vangheluwe Modelling, Simulation and Design Lab (MSDL) School of Computer Science McGill University Montréal, Canada http://msdl.cs.mcgill.ca/

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.1/16

slide-2
SLIDE 2

Overview

Apply Quantization to IVPs:

  • ˙

x = f(t, x) x(0) = x0.

Why? How? Numerical analysis =

⇒ limitations of the approach.

Presentation of an Adaptive Algorithm.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.2/16

slide-3
SLIDE 3

Motivation

DEVS formalism (Zeiglera): rigourous common basis for discrete-event modelling and simulation.

Continuous-Time Formalisms

DTSS DEVS DESS

Discrete Formalisms

Quantization Discretization

aZeigler, Praehofer and Kim, Theory of modeling and simulation.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.3/16

slide-4
SLIDE 4

Idea

Forward Euler approximation:

xi+1 = xi + hi · f(ti, xi)

Discretization: hi known (fixed) in which state is the system going to be at a given future time? Quantization: hi unknown when will the state of the system reach a given value?

hi = xi+1 − xi f(ti, xi) ≤ D |f(ti, xi)|

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.4/16

slide-5
SLIDE 5

Quantization of R

x t ρ D d−1 d1 d0

Quanta Size: D > 0 Quanta Phase: 0 ≤ ρ < D Quanta: dk, k ∈ Z Index function:

x = k ⇐ ⇒ x ∈ dk

Adaptive Quantization:

Dω = DB 2ω , ω ∈ N0

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.5/16

slide-6
SLIDE 6

Non-Adaptive Quantization Algorithm

state transition:

xi+1 = σ (xi, ˙ xi) =     

QI above xi if ˙

xi > 0

QI below xi if ˙

xi < 0 xi

if ˙

xi = 0

time-advance:

hi =    σ (xi, ˙ xi) − xi ˙ xi

if ˙

xi = 0, ∞

if ˙

xi = 0. ≤ D | ˙ xi|

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.6/16

slide-7
SLIDE 7

Sample Result

˙ x = x2 − 4, x(0) = 1.95 with D = 0.05, ρ = 0

  • 2
  • 1

1 2 0.5 1 1.5 2 2.5 3 x t Exact Numerical 10*h

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.7/16

slide-8
SLIDE 8

Consistency

Local Truncation Error:

τ = |x(t1) − x1| = h2 2

  • ˙

f (ξ, x(ξ))

  • ,

t0 ≤ ξ ≤ t1.

for Discretization, we have τ = O(h2). for Quantization, we would like τ = O(Dp), p > 0. But

h0 ≤ D |f(t0, x0)| − → ∞

as f(t0, x0) → 0.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.8/16

slide-9
SLIDE 9

Can only guarantee consistency, i.e. τ = O(D2), if

∀ t and x, |f(t, x)| ≥ ε > 0.

(1)

For an autonomous system, observe (fixed point)

f(x(t1)) = 0 ⇒ f(x(t2)) = 0, ∀ t2 ≥ t1.

But we still have

lim

ε→0 τ = ∞

Conclusion: small slopes are a problem.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.9/16

slide-10
SLIDE 10

Convergence

Global Error:

E(t) = |x(t) − ˜ x(t)| =

  • t
  • ˙

x(s) − ˙ ˜ x(s)

  • ds
  • =
  • t
  • f
  • s, x(s)
  • − f
  • s − µ(s), ˜

x(s) − δ(s)

  • ds
  • .

µ(s): time elapsed since last transition δ(s): distance to previous QI E(t) ≤ L t

  • x(s) − ˜

x(s)

  • ds + L

t

  • δ(s)
  • ds +

+C t

  • µ(s)
  • ds.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.10/16

slide-11
SLIDE 11

Can further simplify as

E(t) ≤ L t E(s) ds + L Dt + C t

  • µ(s)
  • ds.

But µ(s) is not bounded. For an autonomous systema, the last term is absent. We get (Gronwall-Bellman inequality):

E(t) ≤ D

  • eLt − 1

O(D).

aKofman and Junco, Quantized-State Systems: A DEVS Approach for Continuous System Simulation.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.11/16

slide-12
SLIDE 12

If condition (1) holds, then

|µ(s)| ≤ D ε ,

and result above holds for Nonautonomous Systems. Conclusion: small slopes are a problem for Nonautonomous Systems.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.12/16

slide-13
SLIDE 13

Adaptive Algorithm

Want to guarantee τi ≤ TOL at each step, by modifying the quanta size D. Use Richardson extrapolation to approximate ∆i ≈ τi:

∆i+1 = |ˆ xi+1 − xi+1| = hi 2

  • f(ˆ

xi+ 1

2) − f(xi)

  • .

x t ti ˆ xi+1 ti+1 ∆i+1 ˆ xi+ 1

2

xi xi+1

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.13/16

slide-14
SLIDE 14

More tricky than in discretization: Does not generalize well to higher-order systems. Use lowest-order approximation xi+1 instead of higher-order ˆ

xi+1.

Limited control through Adaptive Quantization. Simple algorithm: Recursively halve D until ∆ ≤ TOL After a transition, tentatively double D.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.14/16

slide-15
SLIDE 15

Sample Result

˙ x = x2 − 4, x(0) = 1.95 with DB = 1, ρB = 0.

  • 2
  • 1

1 2 0.5 1 1.5 2 2.5 3 x t Exact TOL = 1.0 e -2 TOL = 5.0 e-3 TOL = 2.5 e-3

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.15/16

slide-16
SLIDE 16

Conclusions

Quantization limited by zero-slope problem: Local Truncation Error τ is unbounded. Global Error E(t) = O(D) for Autonomous Systems

  • nly.

Can we do something? Early experiments in adaptation: not as trivial as in discretization.

SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.16/16