Towards Efficient Distributed Towards Efficient Distributed - - PowerPoint PPT Presentation

towards efficient distributed towards efficient
SMART_READER_LITE
LIVE PREVIEW

Towards Efficient Distributed Towards Efficient Distributed - - PowerPoint PPT Presentation

Towards Efficient Distributed Towards Efficient Distributed Simulation in Modelica using Transmission Line Modeling Martin Sjlund, Peter Fritzson Dept. of Computer and Information Science Robert Braun, Petter Krus Dept. of Management and


slide-1
SLIDE 1

Towards Efficient Distributed Towards Efficient Distributed Simulation in Modelica using Transmission Line Modeling

Martin Sjölund, Peter Fritzson

  • Dept. of Computer and Information Science

Robert Braun, Petter Krus

  • Dept. of Management and Engineering
slide-2
SLIDE 2

Simulations are slow Simulations are slow

  • Centralized solvers are hard to parallelize
  • Large systems do not scale well
  • Stability depends on a global step size

2

slide-3
SLIDE 3

Modern computation units Modern computation units

Throughput incr. 55%/year Parallelism

Assumed increase

  • Multi-Core is the standard

even for home users P li i l th d d

Limit: Clock rate

Device speed

Assumed increase 17%/year possible

  • Penalizes single-threaded

applications

  • Stuck with CPU

Limit: RISC ILP

Pipelining RISC/CISC CPI

Stuck with CPU performance from 2004

65 nm45 nm 32nm 22nm 90 nm

RISC/CISC CPI

Source: Doug Burger, UT Austin 2005

2006

3

slide-4
SLIDE 4

Problems and Solutions Problems and Solutions

  • Problem 1: Speeding up group of simulations
  • Parallel parameter sweep with one simulation per core
  • Problem 2: Speeding up single simulation for short real-time

deadlines deadlines

  • Simplifying the model
  • Parallelizing single simulation
  • Parallelizing single simulation

4

slide-5
SLIDE 5

Distributed model

SubSystem 3 Solver: Euler

Distributed model

Stepsize:0.001 SubSystem 4 Solver: LAPACK S i 1 0 Stepsize:1.0 SubSystem 1 Solver: Dassl Stepsize:0.1 SubSystem 2 Solver: Lsode2 Stepsize:0 01 p Stepsize:0.01

5

slide-6
SLIDE 6

Partitioning the model Partitioning the model

6

slide-7
SLIDE 7

Changing the model Changing the model

  • Changing the connections?
  • Find a better model
  • Retain physically accuracy

7

slide-8
SLIDE 8

Transmission Line Modeling

  • TLM – Transmission Line Modeling – numerically stable co-simulation
  • Physically motivated delays are inserted into TLM element models

g

Physically motivated delays are inserted into TLM element models

  • Originally used in hydraulics with propagation delays along pipes
  • Generalized to other engineering domains

c1, c2 are the TLM-parameters Ttl i th i f ti ti ti

c2

Ttlm is the information propagation time Zf is the implicit impedance

v2,i2 v1,i1 c1

8

c1

slide-9
SLIDE 9

HOPSAN HOPSAN

  • TLM-specific simulation software
  • Efficient simulations
  • Easy to connect components
  • Hard to create new components
  • Written in C++ or Fortran
  • Hard to read old code
  • Explicit discretization

9

slide-10
SLIDE 10

Does TLM work in Modelica? Does TLM work in Modelica?

  • The discretization is done by the compiler and/or solver
  • There are multiple solvers to choose from
  • Equation-based models are easy to read and maintain

10

slide-11
SLIDE 11

Decoupling subsystems using delay()? Decoupling subsystems using delay()?

  • Breaks dependencies between components
  • Interpolation and performance problems
  • Initialization cannot be decoupled
  • During initialization, the delay is the actual expression without

delay in Modelica delay in Modelica

11

slide-12
SLIDE 12

Prototype model Prototype model

  • Pressure relief valve
  • 3x2 variations of the model
  • TLM delay-lines between subsystems using

delay(), sample(), or der()

  • Spring modeled using der() or explicit euler
  • Spring modeled using der() or explicit euler

using the delay() operator

R l ( d l ( T))/T Real v = (x-delay(x,T))/T; // v = der(x) Real a = (v-delay(v,T))/T; // a = der(v)

12

slide-13
SLIDE 13

13

slide-14
SLIDE 14

der() sample() delay() HOPSAN HOPSAN HOPSAN, a=0

Spring using delay()

14

Spring using der()

slide-15
SLIDE 15

Future Future

  • Support manual partitioning of models in OpenModelica
  • Integrate these methods in the new OpenModelica parallel

b k d backend

  • Integrate HOPSAN and OpenModelica models

15

slide-16
SLIDE 16

www.liu.se