mapping odes to devs adaptive quantization
play

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


  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

  2. Overview Apply Quantization to IVPs: � ˙ = f ( t, x ) x x (0) = x 0 . Why? How? Numerical analysis = ⇒ limitations of the approach. Presentation of an Adaptive Algorithm. SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.2/16

  3. Motivation DEVS formalism (Zeigler a ): rigourous common basis for discrete-event modelling and simulation. Continuous-Time Discrete Formalisms Formalisms Quantization DESS DTSS DEVS Discretization a Zeigler, Praehofer and Kim, Theory of modeling and simulation. SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.3/16

  4. Idea Forward Euler approximation: x i +1 = x i + h i · f ( t i , x i ) Discretization: h i known (fixed) in which state is the system going to be at a given future time? Quantization: h i unknown when will the state of the system reach a given value? h i = x i +1 − x i D f ( t i , x i ) ≤ | f ( t i , x i ) | SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.4/16

  5. Quantization of R x Quanta Size: D > 0 Quanta Phase: 0 ≤ ρ < D d 1 Quanta: d k , k ∈ Z Index function: t d 0 � x � = k ⇐ ⇒ x ∈ d k ρ Adaptive Quantization: d − 1 D D ω = D B ω ∈ N 0 2 ω , SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.5/16

  6. Non-Adaptive Quantization Algorithm state transition:  QI above x i if ˙ x i > 0   x i +1 = σ ( x i , ˙ x i ) = QI below x i if ˙ x i < 0  if ˙ x i = 0 x i  time-advance:  σ ( x i , ˙ x i ) − x i if ˙ x i � = 0 ,  ˙ x i = h i if ˙ x i = 0 . ∞  D ≤ | ˙ x i | SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.6/16

  7. Sample Result x = x 2 − 4 , x (0) = 1 . 95 ˙ with D = 0 . 05 , ρ = 0 Exact Numerical 10*h 2 1 0 x -1 -2 0 0.5 1 1.5 2 2.5 3 t SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.7/16

  8. Consistency Local Truncation Error: = | x ( t 1 ) − x 1 | τ h 2 � � � ˙ 0 = f ( ξ, x ( ξ )) t 0 ≤ ξ ≤ t 1 . � , � � 2 for Discretization, we have τ = O ( h 2 ) . for Quantization, we would like τ = O ( D p ) , p > 0 . But D h 0 ≤ | f ( t 0 , x 0 ) | − → ∞ as f ( t 0 , x 0 ) → 0 . SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.8/16

  9. Can only guarantee consistency, i.e. τ = O ( D 2 ) , if ∀ t and x, | f ( t, x ) | ≥ ε > 0 . (1) For an autonomous system, observe (fixed point) f ( x ( t 1 )) = 0 ⇒ f ( x ( t 2 )) = 0 , ∀ t 2 ≥ t 1 . But we still have ε → 0 τ = ∞ lim Conclusion: small slopes are a problem. SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.9/16

  10. Convergence Global Error: � t � � x ( s ) − ˙ � � � � E ( t ) = | x ( t ) − ˜ x ( t ) | = ˙ x ( s ) ˜ ds � � � � 0 � t � � � �� � � � � � = s, x ( s ) − f s − µ ( s ) , ˜ x ( s ) − δ ( s ) f ds � . � � � 0 µ ( s ) : time elapsed since last transition δ ( s ) : distance to previous QI � t � t � � � � E ( t ) ≤ � x ( s ) − ˜ x ( s ) � ds + L � δ ( s ) � ds + L � � � � 0 0 � t � � + C � µ ( s ) � ds. � � 0 SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.10/16

  11. Can further simplify as � t � t � � E ( t ) ≤ L E ( s ) ds + L Dt + C � µ ( s ) � ds. � � 0 0 But µ ( s ) is not bounded. For an autonomous system a , the last term is absent. We get ( Gronwall-Bellman inequality ): � e Lt − 1 � E ( t ) ≤ D ∈ O ( D ) . a Kofman and Junco, Quantized-State Systems: A DEVS Approach for Continuous System Simulation. SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.11/16

  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

  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 = | ˆ x i +1 − x i +1 | h i � � = � f (ˆ 2 ) − f ( x i ) x i + 1 � . � � 2 x i +1 ˆ ∆ i +1 x x i +1 x i + 1 ˆ 2 x i t t i t i +1 SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.13/16

  14. More tricky than in discretization: Does not generalize well to higher-order systems. Use lowest-order approximation x i +1 instead of higher-order ˆ x i +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

  15. Sample Result x = x 2 − 4 , x (0) = 1 . 95 ˙ with D B = 1 , ρ B = 0 . Exact TOL = 1.0 e -2 TOL = 5.0 e-3 2 TOL = 2.5 e-3 1 0 x -1 -2 0 0.5 1 1.5 2 2.5 3 t SCSC’03 Mapping ODEs to DEVS: Adaptive Quantization – p.15/16

  16. Conclusions Quantization limited by zero-slope problem: Local Truncation Error τ is unbounded. Global Error E ( t ) = O ( D ) for Autonomous Systems only. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend